RPM Community Forums

Mailing List Message of <rpm-users>

Re: RPM 5.0.0 -- in place setup and building -- how ?

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 01 Feb 2008 - 16:28:13 CET
Message-Id: <207338E3-D93F-44FC-BA3C-B3CDAF5CDDC3@mac.com>

On Feb 1, 2008, at 10:15 AM, Stefan Westmeier wrote:

> Thx !! Works :-)
>
> One observation I made:
>
> in my macros file (/home/user/SWDev/rpmmacros) I define:
>
> %_builddir       %{wa_root}
>
> rpmbuild --macros /opt/lib/rpm/macros:/home/user/SWDev/rpmmacros \
>                  --define 'wa_root /home/user/SWDev' --eval '% 
> {_builddir}
> --> /home/user/SWDev
>
> rpmbuild --define 'wa_root /home/user/SWDev' \
>                --macros /opt/lib/rpm/macros:/home/user/SWDev/ 
> rpmmacros --eval '%{_builddir}
> --> /opt/src/rpm/BUILD
>
> Is this a bug or a feature ?
>

There's order implicit in how macros are defined.

I can't tell atm bug <-> feature because of current/recent changes
to macro processing. Its not like rpm's macro handling is defined
in some standard.

Traditionally, rpm attempted initialization -> CLI defines -> spec  
file defines
in that order, so I'd say bug. But additional (and useful)  
functionality added
for OpenPKG may prevent the traditional goal in rpm-5.0.

You should get deterministic behavior if you add --macro before any
--define.

BTW, there is also a %{load:/path/to/some/macros} primitive that can
be used to read macro definitions from a file.

73 de Jeff
Received on Fri Feb 1 16:28:37 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.