RPM Community Forums

Mailing List Message of <rpm-devel>

macro stack expansion

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Fri 28 Dec 2007 - 11:58:28 CET
Message-ID: <20071228105828.GA47684@engelschall.com>
Ok, from the CLI the new macro stack expansion now works just fine and
as expected:

| openpkg rpm --define "foo foo" --define "foo bar" --define "foo quux" --eval '%{@foo:,}'
| foo,bar,quux

But from a .spec file the first value is now missing:

| [...]
| BuildPreReq:  foo
| BuildPreReq:  OpenPKG, openpkg >= 20050726
| BuildPreReq:  binutils
| BuildPreReq:  make
| PreReq:       OpenPKG, openpkg >= 20050726
|
| %{lua: io.stdout:write(rpm.expand("%{@buildprereq:, }") .. "\n") }
| [...]

The output is:

| $ /openpkg/bin/openpkg rpm -bb *spec
| OpenPKG, openpkg >= 20050726, binutils, make

Notice that "foo" is missing.

So, there remains at least one subtle bug related to the first macro
value (at the bottom of the stack). Previously for the CLI scenario this
value was output twice, now the CLI scenario is correct, but in .spec
file parsing the first value now is missing.

So, although all other issues are now gone, we still have this
small little bug...

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Fri Dec 28 11:59:13 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.