[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Package versioning and upgrades



On Thu, May 07, 2015 at 01:46:16PM +0200, Turbo Fredriksson wrote:
> On May 7, 2015, at 12:17 PM, Andreas Ronnquist wrote:
> 
> > # dpkg --compare-versions 0.6.4-12-0c60cc-wheezy lt 0.6.4-12-0c60cc && echo true
> > # dpkg --compare-versions 0.6.4-12-0c60cc~wheezy lt 0.6.4-12-0c60cc && echo true 
> > true
> 
> I can't use '~' for the separator, because I want/need full source
> each time. I _could_ mess with the options to git-buildpackage etc,
> but it's so much simpler (for me and everyone else who want to do
> the build on their own) to just use this.
> 
> But I've been using dash for 'many months' and as I said, it used
> to work.

No it never has.  It can't ever work with dash.

> And I still don't get it - "nothing" is still supposed to be higher than
> "something", right?
> 
> 
> Besides, how do I go from "0.6.4-1.1-1-wheezy" to "<something>~wheezy"?
> 
>     dpkg --compare-versions 0.6.4-1.1-1-wheezy lt 0.6.4-1.1-2~wheezy && echo match || echo no match
>     no match
> 
> Here, the basic part of the version is "0.6.4-1.1-1" versus "0.6.4-1.1-2"
> (which to my eyes is supposed to be higher). It's just the 'suffix'
> ('-wheezy' and '~wheezy') that differs.

Exactly.  ~ is special and means essentially that the suffix is less
than nothing.  It is used by backports and experimental and such.

There is nothing else you can use that works the same way.

-- 
Len Sorensen


Reply to: