how exactly does one use "--macros"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  i'm still puzzled by the lack of any effect that the --macros option has 
on the rpm command (which also might extend to rpmbuild, i haven't tested 
that yet).

  if i wanted to define a single macro, i know i can use --define, as in

  $ rpm --define "_topdir /tmp" ...

or something like that, and i can *verify* that that macro is being 
processed by running

  $ rpm --define "_topdir /tmp" --showrc | less

where i can see in the output that _topdir now has the value /tmp.
so far, so good.

  but if i want to redefine the macrofile list, and i try

  $ rpm --macros "/etc/passwd" --showrc | less

(yes, i know /etc/passwd is bogus as a macro file, that shouldn't be 
relevant), the output from the above command shows:

macrofiles            : 
/usr/lib/rpm/macros:/usr/lib/rpm/i386-linux/macros:/usr/lib/rpm/redhat/m
acros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:
/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/i386-linux/macros:~/.rpmmacros

 IOW, that option had no effect.  and, more to the point, what if i wanted
to not overwrite the entire list of macro files, but just, say, append or
prepend a macro file or two.

  as i read in eric f-j's "red hat rpm guide", this option is documented
as:

--macros file:file:file

  Read the given colon-separated files as the macro files to define
  RPM macros; only the first file must exist

so there's nothing here to suggest the ability to make a small change to 
the current list.  it's either all or nothing, is that right?

  comments on any of the above?

rday


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux