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

[dak/security] daklib/utils.py (build_file_list): ignore missing dsc format headers



2008-09-08  Philipp Kern  <pkern@debian.org>

        * daklib/utils.py (build_file_list): do not die on very
        old dsc files without format header

Signed-off-by: Philipp Kern <pkern@debian.org>
---
 ChangeLog       |    3 +++
 daklib/utils.py |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c140220..914921c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
 	before the sha1sum/sha256sum checks as they got seeked by
 	md5sum
 
+	* daklib/utils.py (build_file_list): do not die on very
+	old dsc files without format header
+
 2008-09-07  Philipp Kern  <pkern@debian.org>
 
 	* daklib/utils.py (check_hash): try..except..finally only
diff --git a/daklib/utils.py b/daklib/utils.py
index 7979344..fc1465d 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -436,7 +436,10 @@ def build_file_list(changes, is_a_dsc=0, field="files", hashname="md5sum"):
         format = format[:2]
 
     if is_a_dsc:
-        if format != (1,0):
+        # format = (1,0) are the only formats we currently accept,
+        # format = (0,0) are missing format headers of which we still
+        # have some in the archive.
+        if format != (1,0) and format != (0,0):
             raise UnknownFormatError, "%s" % (changes.get("format","0.0"))
     else:
         if (format < (1,5) or format > (1,8)):
-- 
1.5.6.5



Reply to: