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

Bug#711211: pu: package lsb/4.1+Debian8+deb7u1



Le mercredi, 5 juin 2013 16.09:43, Didier Raboud a écrit :
> The proposed changelog is the following:
> 
> lsb (4.1+Debian8+deb7u1) stable; urgency=low
> 
>   * Fix lsb_release to correctly work with stable release updates
>     incrementing the second digit from Wheezy on. (Closes: #711174)
>   * Add jessie to the release codenames lookup table
> 
>  -- Didier Raboud <odyx@debian.org>  Wed, 05 Jun 2013 12:38:11 +0200
> 
> The full debdiff is attached. I'm sorry for it being a little noisy
> because of the changes needed in the test-suite.

Of course, I forgot to attach the debdiff… Meh.

OdyX
diff -Nru lsb-4.1+Debian8/debian/changelog lsb-4.1+Debian8+deb7u1/debian/changelog
--- lsb-4.1+Debian8/debian/changelog	2012-11-05 12:08:22.000000000 +0100
+++ lsb-4.1+Debian8+deb7u1/debian/changelog	2013-06-05 12:39:20.000000000 +0200
@@ -1,3 +1,11 @@
+lsb (4.1+Debian8+deb7u1) stable; urgency=low
+
+  * Fix lsb_release to correctly work with stable release updates
+    incrementing the second digit from Wheezy on. (Closes: #711174)
+  * Add jessie to the release codenames lookup table
+
+ -- Didier Raboud <odyx@debian.org>  Wed, 05 Jun 2013 12:38:11 +0200
+
 lsb (4.1+Debian8) unstable; urgency=low
 
   * Fix libqt3-mt missing epoch.
diff -Nru lsb-4.1+Debian8/lsb_release.py lsb-4.1+Debian8+deb7u1/lsb_release.py
--- lsb-4.1+Debian8/lsb_release.py	2012-11-02 10:49:48.000000000 +0100
+++ lsb-4.1+Debian8+deb7u1/lsb_release.py	2013-06-05 12:38:05.000000000 +0200
@@ -41,7 +41,8 @@
     '4.0' : 'etch',
     '5.0' : 'lenny',
     '6.0' : 'squeeze',
-    '7.0' : 'wheezy',
+    '7'   : 'wheezy',
+    '8'   : 'jessie',
     }
 
 TESTING_CODENAME = 'unknown.new.testing'
@@ -56,7 +57,10 @@
     if not m:
         return unknown
 
-    shortrelease = '%s.%s' % m.group(1,2)
+    if int(m.group(1)) < 7:
+        shortrelease = '%s.%s' % m.group(1,2)
+    else:
+        shortrelease = '%s' % m.group(1)
     return RELEASE_CODENAME_LOOKUP.get(shortrelease, unknown)
 
 # LSB compliance packages... may grow eventually
diff -Nru lsb-4.1+Debian8/test/test_lsb_release.py lsb-4.1+Debian8+deb7u1/test/test_lsb_release.py
--- lsb-4.1+Debian8/test/test_lsb_release.py	2012-11-02 10:49:48.000000000 +0100
+++ lsb-4.1+Debian8+deb7u1/test/test_lsb_release.py	2013-06-05 12:38:05.000000000 +0200
@@ -40,6 +40,9 @@
 			cdn = lr.RELEASE_CODENAME_LOOKUP[rno]
 			# Test that 1.1, 1.1r0 and 1.1.8 lead to buzz. Default is picked randomly and is not supposed to go trough
 			badDefault = rnd_string(0,9)
+			# From Wheezy on, the codename is defined by the first number but a dot-revision is mandatory
+			if float(rno) >= 7:
+				rno = rno + '.' + str(random.randint(0,9))
 			self.assertEqual(lr.lookup_codename(rno,badDefault),cdn,'Release name `' + rno + '` is not recognized.')
 			self.assertEqual(lr.lookup_codename(rno + 'r' + str(random.randint(0,9)),badDefault),cdn,'Release name `' + rno + 'r*` is not recognized.')
 			self.assertEqual(lr.lookup_codename(rno + '.' + str(random.randint(0,9)),badDefault),cdn,'Release name `' + rno + '.*` is not recognized.')
@@ -220,7 +223,11 @@
 
 		# Test "stable releases" with numeric debian_versions
 		for rno in lr.RELEASE_CODENAME_LOOKUP:
-			distinfo['RELEASE'] = rno + random.choice('.r') + str(random.randint(0,9))
+			# From Wheezy on, the codename is defined by the first number but a dot-revision is mandatory
+			if float(rno) >= 7:
+				distinfo['RELEASE'] = rno + '.' + str(random.randint(0,9))
+			else:
+				distinfo['RELEASE'] = rno + random.choice('.r') + str(random.randint(0,9))
 			distinfo['CODENAME'] = lr.RELEASE_CODENAME_LOOKUP[rno]
 			distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s (%(CODENAME)s)' % distinfo
 			fn = 'test/debian_version_' + rnd_string(5,5)

Reply to: