In <20090603192216.ge6...@think.homelan>, Andrei Popescu wrote: >On Wed,03.Jun.09, 10:34:36, Sven Joachim wrote: >> > I think the correct way is to *append* to the version, not munge it: >> > >> > 1.2.3lenny1+local1 (I like to use + as separator) >> >> This will not work if the original version is 1.2.3, because >> 1.2.3+local1 > 1.2.3lenny1 (the version for potential security updates). > >'+' is a bad separator, '~' is better:
'~' is confusing, but necessary. Unless you are using it for it's special meaning you shouldn't use it. '+' is the smallest "separator", which is why I recommended it. I recommend against '-' and ':' most of the time because they can change a native package to non-native or a non-epoch'd package to one that has an epoch; they aren't suitable for suffixes anyway since they can't be part of a Debian revision. I tend to reserve '.' for NMUs and new upstream versions. Of course, dpkg has no idea of "separator". It has numeric sections (all digits) and non-numeric sections (all non-digits). [Reading the whole of deb-version(5) if good.] >$ dpkg --compare-versions 1.2.3~local1 lt 1.2.3lenny1 ; echo $? >0 No, that is not good is this case '~' is even less than an empty string: $ dpkg --compare-versions 1.2.3~local1 lt 1.2.3 ; echo $? 0 So, aptitude/apt-get will want to upgrade 1.2.3~local1 to 1.2.3. While it looks a bit funny, using the suffix "a~local1" will probably always work, as long as Debian release code names continue to be strictly alphabetic. 1.2.3 < 1.2.3a~local1 < 1.2.3etch4 < 1.2.3lenny1 < 1.2.3squeeze0 < 1.2.4 [OT] Debian version numbers are interesting to me, mathematically. I think simple lexicographical ordering of string results in an ordered set similar to the rational number. However, I think the introduction of "~" as being less than an empty string makes Debian version numbers more similar to the real numbers; since they now have least upper bounds and greatest lower bound for all subsets. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
signature.asc
Description: This is a digitally signed message part.