]> git.decadent.org.uk Git - dak.git/commitdiff
Reject arch:all binNMUs
authorAnsgar Burchardt <ansgar@debian.org>
Mon, 18 Jan 2016 19:28:31 +0000 (20:28 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Mon, 18 Jan 2016 19:28:31 +0000 (20:28 +0100)
While arch:all binNMUs might work for some packages, they still tend
to create problems due to versioned dependencies using

  arch-all-package (= ${source:Version})

as these will be broken by the binNMU.  To avoid these, we reject
arch:all binNMUs for now.

daklib/archive.py
daklib/checks.py

index 3477f333c424ce030ca5554d5d6d6b2ae533b0ab..fc31b6a5403253e42b5528b95bd428d76d446564 100644 (file)
@@ -961,6 +961,7 @@ class ArchiveUpload(object):
                     checks.BinaryCheck,
                     checks.BinaryTimestampCheck,
                     checks.SingleDistributionCheck,
+                    checks.ArchAllBinNMUCheck,
                     ):
                 chk().check(self)
 
index e17a191e39472b112e50f24a00442da161c65970..9916cc755fab492a35e7763692f1ccc6cdde416d 100644 (file)
@@ -725,6 +725,16 @@ class NoSourceOnlyCheck(Check):
 
         return True
 
+class ArchAllBinNMUCheck(Check):
+    """Check for arch:all binNMUs"""
+    def check(self, upload):
+        changes = upload.changes
+
+        if 'all' in changes.architectures and changes.changes.get('Binary-Only') == 'yes':
+            raise Reject('arch:all binNMUs are not allowed.')
+
+        return True
+
 class LintianCheck(Check):
     """Check package using lintian"""
     def check(self, upload):