[Fedora-packaging] disttag
Tom 'spot' Callaway
tcallawa at redhat.com
Fri Feb 25 14:05:23 UTC 2005
On Fri, 2005-02-25 at 11:42 +0100, Matthias Saou wrote:
>Tom 'spot' Callaway wrote :
>
>> %disttaglong %{expand:%%(rpm -qi `rpm -qf /etc/redhat-release` |grep
>> Version | cut -d ":" -f 2 | cut -d " " -f 2 | perl -pe 's/^\s+//')}
>
>Hmm, haven't had enough coffee yet, but is the above just to get the
>version of the package that contains the redhat-release file!? If so, what
>about this instead :
>
>%(rpm -qf --qf '%{version}' /etc/redhat-release)
>
>I _must_ be missing something...
You are. We can't use %{version} in the macro, because when its parsed
at buildtime, it grabs the %{version} for the package being built, and
replaces it before running the command. Hence the ickiness.
~spot
---
Tom "spot" Callaway: Red Hat Sales Engineer || GPG Fingerprint: 93054260
Fedora Extras Steering Committee Member (RPM Standards and Practices)
Aurora Linux Project Leader: http://auroralinux.org
Lemurs, llamas, and sparcs, oh my!
More information about the Fedora-packaging
mailing list