Source: software-center
Version: 1.1.21debian2
Severity: wishlist
Tags: patch

In my setup here, I have a script that goes through the whole Debian archive 
rebuilding all source packages to test for FTBFS bugs.  It uses a pbuilder 
hook script which adds a dummy entry to the beginning of debian/changelog with 
version like "1.1.21debian2+pb1", so that the resulting packages can be used 
in a local apt repository without apt getting those packages confused with the 
official binary packages.  But in the case of software-center, this causes an 
FTBFS:

...
 fakeroot debian/rules clean
dh --with=python-central clean
   dh_testdir
   dh_auto_clean
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    VERSION = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
dh_auto_clean: python setup.py clean -a returned exit code 1
make: *** [clean] Error 1
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2

The attached patch fixes this.  Filing as wishlist since software-center only 
builds "Architecture: all" packages, so there's little danger of an actual 
binNMU.
-- 
Daniel Schepler
--- software-center-1.1.21debian2/setup.py	2010-03-29 14:22:55.000000000 +0000
+++ software-center-1.1.21debian2.new/setup.py	2010-04-09 16:35:26.000000000 +0000
@@ -11,7 +11,7 @@
 
 # update version.py
 line = open("debian/changelog").readline()
-m = re.match("^[\w-]+ \(([\w\.~]+)\) ([\w-]+);", line)
+m = re.match("^[\w-]+ \(([\w\.~\-\+]+)\) ([\w-]+);", line)
 VERSION = m.group(1)
 CODENAME = m.group(2)
 DISTRO = Popen(["lsb_release", "-s", "-i"], stdout=PIPE).communicate()[0].strip()

Reply via email to