RPM Community Forums

Mailing List Message of <rpm-devel>

disttag/distepoch in RPMTAG_NVRA [Fwd: [Cooker] Warning: remaining bugs in RPM ? (no distro tag)]

From: Per Řyvind Karlsen <pkarlsen@rpm5.org>
Date: Wed 19 Jan 2011 - 13:45:13 CET
Message-ID: <AANLkTi=6-p5c0d554joJaHLM-xVQfDw=Y8zkPszGjyxc@mail.gmail.com>
For RPMTAG_NVRA to expand to using%{___NVRA}, I found myself
having to modify hGetNevra().

To make dbiFindMatches() to match -%{disttag}%{distepoch}, I changed
_post_NVRA to:

static const char _post_NVRA[] =
"(-[^-]+-[^-]+-[^-]+\\.[^.]+|-[^-]+-[^-]+\\.[^.]+|-[^-]+\\.[^.]+|\\.[^.]+|)$";

This expression gets too greedy for packages with '-' in the name and
without disttag/distepoch though..

ie. 'rpm -q foo' might return:
foo-1-1-mdv2011.0.x86_64
foo-bar-1-1mdv2011.0.x86_64

---------- Forwarded message ----------
From: Jeff Johnson <n3npq@mac.com>
Date: 2011/1/19
Subject: Re: [Cooker] Warning: remaining bugs in RPM ? (no distro tag)
To: cooker@mandrivalinux.org



On Jan 19, 2011, at 7:02 AM, Per Řyvind Karlsen wrote:

>>
>> I fail to understand "manually", nor is there a downside (as
>> long as RPM never has to look up localized package depedencies).
> To get %{NVRA} to return the same, the macro needs to be expanded in
> rpmdb/hdrfmt.c:hGetNevra()
> though. I've not been able to get the matching in dbiFindMatches() to
> work with it though..
>

Dunno why you are in hGetNevra(), but I'm sure that there's a fix.
I'd need a clearer explanation (on <rpm-devel@>) of what you need to suggest
or implement something.

73 de Jeff
Received on Wed Jan 19 13:45:51 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.