]> git.decadent.org.uk Git - dak.git/commitdiff
Merge upstream
authorJoerg Jaspert <joerg@debian.org>
Fri, 25 Apr 2008 21:41:10 +0000 (23:41 +0200)
committerJoerg Jaspert <joerg@debian.org>
Fri, 25 Apr 2008 21:41:10 +0000 (23:41 +0200)
ChangeLog
dak/process_unchecked.py

index 7666bdba6c0ede14d149e6b10c201145f03ca806..e227e68d5c65cc9c62b12c31ac7e1a02315111a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * daklib/utils.py (build_file_list): Deal with "Format 3 style"
        Format lines (ie. those having extra text appended).
 
+2008-04-19  Joerg Jaspert  <joerg@debian.org>
+
+       * dak/process_unchecked.py (check_files): Sanity check the
+       provides field, which closes #472783
+
 2008-04-18  Joerg Jaspert  <joerg@debian.org>
 
        * config/debian/dak.conf: Add mapping stable-proposed-updates
index 055f7ee85b84d1d04e02dd6f905a64734818fe13..498eb49f0dd6a21da49cd2d76bb0e052c3efbf26 100755 (executable)
@@ -44,6 +44,7 @@ re_valid_pkg_name = re.compile(r"^[\dA-Za-z][\dA-Za-z\+\-\.]+$")
 re_changelog_versions = re.compile(r"^\w[-+0-9a-z.]+ \([^\(\) \t]+\)")
 re_strip_revision = re.compile(r"-([^-]+)$")
 re_strip_srcver = re.compile(r"\s+\(\S+\)$")
+re_spacestrip = re.compile('(\s)')
 
 ################################################################################
 
@@ -461,6 +462,16 @@ def check_files():
             if depends == '':
                 reject("%s: Depends field is empty." % (file))
 
+            # Sanity-check the Provides field
+            provides = re_spacestrip.sub('', control.Find("Provides"))
+            if provides == '':
+                reject("%s: Provides field is empty." % (file))
+            prov_list = provides.split(",")
+            for prov in prov_list:
+                if not re_valid_pkg_name.match(prov):
+                    reject("%s: Invalid Provides field content %s." % (file, prov))
+
+
             # Check the section & priority match those given in the .changes (non-fatal)
             if control.Find("Section") and files[file]["section"] != "" and files[file]["section"] != control.Find("Section"):
                 reject("%s control file lists section as `%s', but changes file has `%s'." % (file, control.Find("Section", ""), files[file]["section"]), "Warning: ")