From 368b5f9e628e664fef3cfce060943a0e7d168c59 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Mon, 18 Jan 2016 20:28:31 +0100 Subject: [PATCH] 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 3477f333..fc31b6a5 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 e17a191e..9916cc75 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.39.2