Remove the source package when the binary package name is not the same as the source... 0.1.18
authorQuentin Smith <quentin@mit.edu>
Fri, 25 Nov 2011 02:27:47 +0000 (21:27 -0500)
committerQuentin Smith <quentin@mit.edu>
Fri, 25 Nov 2011 02:27:47 +0000 (21:27 -0500)
debian/changelog
invirtibuilder

index bc34a10..0a99b19 100644 (file)
@@ -1,3 +1,10 @@
+invirt-dev (0.1.18) unstable; urgency=low
+
+  * Remove the source package when the binary package name is not the same
+    as the source package name
+
+ -- Quentin Smith <quentin@mit.edu>  Thu, 24 Nov 2011 21:26:29 -0500
+
 invirt-dev (0.1.17) unstable; urgency=low
 
   * Remove all binary packages built from a source package when rebuilding
 invirt-dev (0.1.17) unstable; urgency=low
 
   * Remove all binary packages built from a source package when rebuilding
index 8a6b077..bf3b499 100755 (executable)
@@ -202,8 +202,10 @@ def uploadBuild(pocket, workdir):
         except subprocess.CalledProcessError, e:
             if not force:
                 raise
         except subprocess.CalledProcessError, e:
             if not force:
                 raise
-            packages = deb822.Changes(open(changes).read())['Binary']
-            for package in packages.split():
+            changelog = deb822.Changes(open(changes).read())
+            packages = set(changelog['Binary'].split())
+            packages.add(changelog['Source'])
+            for package in packages:
                 logAndRun(['reprepro-env', 'remove', apt, package])
             logAndRun(upload)
 
                 logAndRun(['reprepro-env', 'remove', apt, package])
             logAndRun(upload)