importpkg: source header may contain a version
authorHelmut Grohne <helmut@subdivi.de>
Tue, 5 Mar 2013 07:21:13 +0000 (08:21 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Tue, 5 Mar 2013 07:21:13 +0000 (08:21 +0100)
importpkg.py

index 2f3979b..d63b85e 100755 (executable)
@@ -132,7 +132,7 @@ def process_package(db, filelike):
                 control = deb822.Packages(control)
                 package = control["package"].encode("ascii")
                 try:
-                    source = control["source"].encode("ascii")
+                    source = control["source"].encode("ascii").split()[0]
                 except KeyError:
                     source = package
                 version = control["version"].encode("ascii")