Mailinglist Archive: opensuse-packaging (37 mails)

< Previous Next >
Re: [opensuse-packaging] Querying version of a package
  • From: Axel Braun <axel.braun@xxxxxx>
  • Date: Wed, 26 Dec 2018 21:49:54 +0100
  • Message-id: <15628282.YLioJE39je@t520.axxite.internal>
Am Mittwoch, 26. Dezember 2018, 20:29:57 CET schrieb Andrei Borzenkov:
26.12.2018 22:11, Axel Braun пишет:
Good evening,

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.

That was the solution, thank you!

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

< Previous Next >
List Navigation