importpkg: be more liberal in control file naming
authorHelmut Grohne <helmut@subdivi.de>
Wed, 23 Jul 2014 16:07:39 +0000 (18:07 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 23 Jul 2014 16:07:39 +0000 (18:07 +0200)
While in current sid packages the control file in control.tar is always
named "./control", some older packages name it "control".

importpkg.py

index 06d9da4..7e074e1 100755 (executable)
@@ -68,7 +68,7 @@ def process_package(filelike, hash_functions):
             state = "control"
             tf = decompress_tar(af, name[11:])
             for elem in tf:
-                if elem.name != "./control":
+                if elem.name not in ("./control", "control"):
                     continue
                 if state != "control":
                     raise ValueError("duplicate control file")