Explicit rpm requires
Rex Dieter
rdieter at math.unl.edu
Tue Mar 10 20:53:24 UTC 2009
Matthew D Truch wrote:
>> > I used to use the following line in my kst-fits subpackage to
>> > explicitly require the exact version of cfitsio that kst was built
>> > against (as cfitsio does explicit version checking and will refuse to
>> > run otherwise).
>> >
>> > Requires: cfitsio = %(rpm -q cfitsio --qf %{V})
>>
>> You've apparently never heard spot's "rpm" talk, which includes something
>> like:
>> thou shalt not envoke rpm from within a specfile
>>
>> I was about to suggest you could use the output of:
>> pkg-config --modversion cfitsio
>> but that seems to be broken in cfitsio.pc (returns 3.006 on my F-10 box).
>
> Well, I've fixed the pkgconfig file so the version is correct, however
> that won't solve this problem.
OK, try something like this instead:
Requires: cfitsio = %(pkg-config --modversion cfitsio 2>/dev/null || echo 0)
-- Rex
More information about the fedora-devel-list
mailing list