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 <n3...@mac.com> Date: 2011/1/19 Subject: Re: [Cooker] Warning: remaining bugs in RPM ? (no distro tag) To: coo...@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 ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org