Mailinglist Archive: opensuse-packaging (36 mails)

< Previous Next >
Re: [opensuse-packaging] Querying version of a package
26.12.2018 22:11, Axel Braun пишет:
Good evening,

tl;dr
I have a package foo, depending on package bar.
If I query the version of bar on the command line I get:
rpm -q --qf '%{VERSION}' bar -> 4.6.9 (correct result)

If I do the same in the build environment (specfile) I get the version of foo
instead (wrong result)

Any idea where this comes from, and how to fix?


%{VERSION} gets expanded by rpm as spec macro. You need to use
%%{VERSION} to quote it.

Long version:
https://forums.opensuse.org/showthread.php/534165-Checking-version-of-a-required-package

Have a good evening
Axel



--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups
References