Mailinglist Archive: opensuse-packaging (267 mails)

< Previous Next >
Fwd: [opensuse-packaging] How to detect package's version in specfile?
  • From: Marguerite Su <i@xxxxxxxxxxxxx>
  • Date: Fri, 2 Nov 2012 13:14:18 +0800
  • Message-id: <CAK0PdAnNW+Df5M3Un3chMjQgt=UTXeEwpQXh+SHOW2_MdrmEOg@mail.gmail.com>
在 2012-11-1 下午11:37,"Guido Berhoerster" <gber@xxxxxxxxxxxx>写道:

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.

What is BRE?

I mean, the rpmquery gets a 16.0.1, and you used a pipe and sed s///
replacement to get 16.

But \..*$ doesn't looks like the regex we normally use, the
[0–9]\.[0-9]\. Stuff. So.I want to know how it works like regex. Eg I
want to cut 2.8.9 to 9, how can I do that in your way?

And why in spec you cant compare %if 16.0.1 == 16 (get a -1) but can
compare %if 16 > 15? Why I have to cut it using sed or I have to use
lua script to compare the full output? I think all the numbers here
are treated as strings, but why some fails while some still works?

Thanks

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

< Previous Next >
List Navigation