~ubuntu-branches/debian/sid/lsb/sid

« back to all changes in this revision

Viewing changes to lsb_release.py

  • Committer: Package Import Robot
  • Author(s): Didier Raboud, Colin Watson, Didier Raboud
  • Date: 2013-06-05 12:30:53 UTC
  • Revision ID: package-import@ubuntu.com-20130605123053-oevzvtf4figwe8v3
Tags: 4.1+Debian12
[ Colin Watson ]
* Depend directly on libnss3 and libnspr4 rather than via the
  transitional packages libnss3-1d and libnspr4-0d.

[ Didier Raboud ]
* Drop one more unnecessary use of /bin/echo -n.
* Fix lsb_release to correctly work with stable release updates
  incrementing the second digit from Wheezy on. (Closes: #711174)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    '4.0' : 'etch',
42
42
    '5.0' : 'lenny',
43
43
    '6.0' : 'squeeze',
44
 
    '7.0' : 'wheezy',
45
 
    '8.0' : 'jessie',
 
44
    '7'   : 'wheezy',
 
45
    '8'   : 'jessie',
46
46
    }
47
47
 
48
48
TESTING_CODENAME = 'unknown.new.testing'
57
57
    if not m:
58
58
        return unknown
59
59
 
60
 
    shortrelease = '%s.%s' % m.group(1,2)
 
60
    if int(m.group(1)) < 7:
 
61
        shortrelease = '%s.%s' % m.group(1,2)
 
62
    else:
 
63
        shortrelease = '%s' % m.group(1)
61
64
    return RELEASE_CODENAME_LOOKUP.get(shortrelease, unknown)
62
65
 
63
66
# LSB compliance packages... may grow eventually