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

[dak/master] Reject arch:all binNMUs



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 |  1 +
 daklib/checks.py  | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/daklib/archive.py b/daklib/archive.py
index 3477f33..fc31b6a 100644
--- a/daklib/archive.py
+++ b/daklib/archive.py
@@ -961,6 +961,7 @@ class ArchiveUpload(object):
                     checks.BinaryCheck,
                     checks.BinaryTimestampCheck,
                     checks.SingleDistributionCheck,
+                    checks.ArchAllBinNMUCheck,
                     ):
                 chk().check(self)
 
diff --git a/daklib/checks.py b/daklib/checks.py
index e17a191..9916cc7 100644
--- a/daklib/checks.py
+++ b/daklib/checks.py
@@ -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):
-- 
2.1.4


Reply to: