RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ CHANGES rpm/rpmio/ macro.c

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Thu 27 Dec 2007 - 23:41:55 CET
Message-ID: <20071227224155.GA58354@engelschall.com>
On Thu, Dec 27, 2007, Jeff Johnson wrote:

>     - convert %{@foo:|} to "foo|bar|quux" tuple. %@foo assumes CSV comma.

Cool. Just the following immediate feedback:

1. I'm wondering whether it was intentional or just
   an accident that you implemented it in a way so that only a
   single-character separator is allowed (instead of an arbitrary
   string):

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

   I would have expected the output

   | quux, bar, foo, foo

2. Additionally, I think there is still a bug as the bottom element is
   doubled, as the expected output actually should be just:

   | quux, bar, foo

3. Finally, although internally a real "stack", there remains the
   question for me what the "natural" order of the expansion is? I
   personally think that for the sequence "Test: foo", "Test: bar",
   "Test: quux" the expansion of "%{@test:,}" actually should be
   "foo,bar,quux" and not in "quux,bar,foo". Technically, in mist
   situations I can think of it will not matter. But it will be easier
   for a human to match a resulting expansion text to the actual
   origin(s).

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Thu Dec 27 23:42:45 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.