Monday, August 13, 2012

Funny version numbers

Often, I install a new Debian package using apt-get install, and as the progress output flies by, I wonder, Whoa!, should I really be using a piece of software with that version number?

It says a lot, after all. If I see

tool 2.4.1-2
then I (subconsciously) think, yeah, the upstream maintainers are obviously sane, the tool has been around for a while, they have made several major and minor releases, and what I'm using has seen about one round of bug fixing, and a minimal amount of tweaking by the Debian maintainer.

On the other hand, when I see

tool 7.0.50~6.5~rc2+0.20120405-1
I don't know what went on there. The original release version 7.0.50 was somehow wrong and had to be renamed 6.5? And then the 2nd release candidate of that? And then even that wasn't good enough, and some dated snapshot had to be taken?

Now, of course, there are often reasons for things like this, but it doesn't look good, and I felt it was getting out of hand a little bit.

I tried to look into this some more and find a regular expression for a reasonably sane version number. It's difficult. This is how far I've gotten: https://gist.github.com/3345974. But this still lists more than 1500 packages with funny version numbers. Which could be cause for slight concern.

Take a look at what this prints. You can't make some of that stuff up.

4 comments:

  1. Yes, I know, 0.7~really0.6.10, yeah! :)

    ReplyDelete
  2. Maybe allow "dfsg" version numbers as well?

    ReplyDelete
  3. grep-dctrl -F Version -e -n -s Package,Version -v '^([[:digit:]]:)?[[:digit:]]+(\.[[:digit:]]+)*[[:alpha:]]?(-[[:digit:]]+)?(.dfsg[[:digit:]]?)?(-[[:digit:]]+(\.[[:digit:]])?(\+b1)?)?(\+nmu[[:digit:]])?$' /var/lib/apt/lists/http.debian.net_debian_dists_*source_Sources | less

    ... if you care less about sorting and counting but rather for the package names - thanks for the nice hint

    Andreas Tille

    ReplyDelete
  4. My personal favourite is still 1:8.11+urwcyr1.0.7~pre44-4.2

    ReplyDelete