From 65b85ca7e922a20dbc121c1e3ab5db38af8cc697 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 8 Oct 2015 08:26:59 +0200 Subject: [PATCH] Make linux* wait on corresponding -meta package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to treat linux-$flavor and linux-meta-$flavor as one set in britney which goes in together or not at all. We never want to promote linux-$flavor without the accompanying linux-meta-$flavor. Introduce a synthetic linux* → linux-meta* dependency to enforce this grouping. --- britney.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/britney.py b/britney.py index 9cdb539..ce8fafd 100755 --- a/britney.py +++ b/britney.py @@ -1096,8 +1096,26 @@ class Britney(object): # local copies for better performance parse_depends = ma_parse_depends - # analyze the dependency fields (if present) deps = binary_u.depends + + # make linux* wait on corresponding -meta package + if src.startswith('linux'): + meta = src.replace('linux', 'linux-meta', 1) + if meta in self.sources[suite]: + # copy deps here, don't modify self.binaries! + if deps: + deps = deps + ', ' + else: + deps = '' + # find binary of our architecture + for pkg_id in self.sources[suite][meta].binaries: + if pkg_id.architecture == arch: + binver = self.binaries[suite][arch][0][pkg_id.package_name].source_version + deps += '%s (>= %s)' % (pkg_id.package_name, binver) + self.log('Synthesizing dependency %s to %s: %s' % (meta, src, deps)) + break + + # analyze the dependency fields (if present) if not deps: return True is_all_ok = True