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

Re: Dash and dot in package version

On Sat, May 16, 2009 at 1:00 AM, Ludovico Cavedon
<ludovico.cavedon@gmail.com> wrote:
> On Sat, May 16, 2009 at 12:22 AM, Jan Hauke Rahm <info@jhr-online.de> wrote:
>>> - "2.2~rc3-hg365+dfsg1", but would have the "-" any drawback I do not see?
> Ups, this does not work.

It does actually:
$ dpkg --compare-versions "2.2~rc3-hg365+dfsg1" gt "2.2~rc3+dfsg1" && echo true
$ dpkg --compare-versions "2.2~rc3-hg365+dfsg1-1" gt "2.2~rc3+dfsg1-1"
&& echo true

dpkg --compare-versions splits the string into upstream version and
debian release according to the last "-". So if we want to compare an
upstream version containing a "-" we need to expiclity add a debian
release (.e.g -1).

I also find out the answer to my original questions: '.', '+' and '-'
get no special treatment, but they follow ASCII ordering:
+ < - < .


Reply to: