Mailinglist Archive: opensuse-packaging (267 mails)

< Previous Next >
Re: [opensuse-packaging] How to detect package's version in specfile?
  • From: Guido Berhoerster <gber@xxxxxxxxxxxx>
  • Date: Thu, 1 Nov 2012 16:37:03 +0100
  • Message-id: <20121101153703.GD15835@hal.local.invalid>
* Marguerite Su <i@xxxxxxxxxxxxx> [2012-11-01 16:17]:
On Thu, Nov 1, 2012 at 10:48 PM, Michal Vyskocil <mvyskocil@xxxxxxx> wrote:
1.) it is perfectly valid to check package version in a spec calling
rpm -q $PACKAGE - Rudi pointed it makes more sense to do that, that
missusing %suse_version macro.

I still think it might be a good idea to give Tumbleweed a valid
rolling version number like 1225 (1220 < Tumbleweed < Factory = 1230)
in /usr/lib/rpm/suse_macros. or just add a new macro like sles.

But since it's not possible (seems), we can use specific package
version to do the trick.

eg: xulrunner-devel is not available in <=1210. and Tumbleweed is the
only one have 14.0.1 version. (12.2 is 16.0.1 and Factory is 16.0.2)


%if 0%{?suse_version} >= 1220
%if 0%{?xulrunner_version} < 15
// Now you're in Tumbleweed env

the shortcoming is if Tumbleweed updates this package, we need to find
new unique package. or we can submit a fake package into Tumbleweed to
do the job solely.

A suse_version number only really makes sense for stable releases
(that is the version number corresponds to a mostly static set of
packages), for Tumbleweed and Factory they do not have much meaning.

PS: Guido, is "s|\\..*$||" regression? I asked around on gtalk, but no
one knows such regex style...can you explain it a little bit?

Not sure what you mean, it's just a BRE, the double backslash is
needed there because rpmbuild also interprets backslashes.
Guido Berhoerster
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation