How precise can a version number be?

normes's picture

Today I've done some statistical analysis on Debian "Packages" files of lenny and sid, just casuall located:

$ time max-version-len.py
Package: rt73-modules-2.6.25-2-486
Version: 2.6.25+1.0.3.6-cvs20080623-dfsg1-3
 len: 44

real    0m3.219s
user    0m2.948s
sys    0m0.124s

I don't know which package would be the top 1, if we select all non-"-dfsg" version numbers and add a pseudo "-dfsg1"... :o) Version numbers with more than 40 characters are very... precise.

$ cat max-version-len.py 
#!/usr/bin/python2.5

import re

filename="Packages"

vr=re.compile('^Version:.*')
pr=re.compile('^Package:.*')
f=file(filename, 'r')
vr_string=""


for line in f.readlines():
if pr.match(line):
pr_string = line
if vr.match(line):
if len(line) > len(vr_string):
vr_string = line
pkgname = pr_string

print pkgname + vr_string + "   len: %s" % len(vr_string)

Comments

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may quote other posts using [quote] tags.

More information about formatting options