From 858e8de2183bd5064734cba619ff565cd56c98f5 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sun, 17 Mar 2013 10:33:59 +0000 Subject: [PATCH 1/7] same_source: handle being passed "None" as a version Although this should never happen, rather than crashing if one of the versions is none, simply indicate that they are unequal. Signed-off-by: Adam D. Barratt --- britney.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/britney.py b/britney.py index 252f722..59ae2a6 100755 --- a/britney.py +++ b/britney.py @@ -988,6 +988,9 @@ class Britney(object): if sv1 == sv2: return 1 + if sv1 is None or sv2 is None: + return 0 + m = re.match(r'^(.*)\+b\d+$', sv1) if m: sv1 = m.group(1) m = re.match(r'^(.*)\+b\d+$', sv2) From c7f27a8225597838f2fe8ee4b4c8e0234cbacf38 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sun, 5 May 2013 11:09:37 +0000 Subject: [PATCH 2/7] Re-enable smooth-updates Signed-off-by: Adam D. Barratt --- britney.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/britney.conf b/britney.conf index ae082a3..c0bd71a 100644 --- a/britney.conf +++ b/britney.conf @@ -57,4 +57,4 @@ HINTS_SATBRITNEY = easy # # naming a non-existent section will effectively disable new smooth # updates but still allow removals to occur -SMOOTH_UPDATES = badgers +SMOOTH_UPDATES = libs oldlibs From a58f6d72c9f6bd911b9a2d5022c75ff2568403ca Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sat, 8 Jun 2013 15:40:07 +0000 Subject: [PATCH 3/7] Ensure that binNMUs from superseded sources are not considered Given a source which provides two packages and has different versions in testing and unstable, binNMUs in unstable corresponding to the older source version should not be considered as migration candidates. For example: testing ------- source 1 bin 1 arch1 bin 1 arch2 unstable -------- source 2 bin 2 arch1 bin 1+b1 arch2 The binary migration on arch2 should not be considered a candidate. Signed-off-by: Adam D. Barratt --- britney.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/britney.py b/britney.py index 59ae2a6..d9663b3 100755 --- a/britney.py +++ b/britney.py @@ -1187,6 +1187,12 @@ class Britney(object): excuse.addhtml("From wrong source: %s %s (%s not %s)" % (pkg_name, binary_u[VERSION], pkgsv, source_t[VERSION])) break + # if the source package has been updated in unstable and this is a binary migration, skip it + if self.same_source(source_t[VERSION], pkgsv) and source_t[VERSION] != source_u[VERSION]: + anywrongver = True + excuse.addhtml("From wrong source: %s %s (%s not %s)" % (pkg_name, binary_u[VERSION], pkgsv, source_u[VERSION])) + break + # find unsatisfied dependencies for the new binary package self.excuse_unsat_deps(pkg_name, src, arch, suite, excuse) From 9ee37c51602a8e45110d15fa312acfd432728212 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Wed, 12 Jun 2013 19:39:27 +0000 Subject: [PATCH 4/7] Enable support for p-u packages Signed-off-by: Adam D. Barratt --- britney.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/britney.conf b/britney.conf index c0bd71a..910eed2 100644 --- a/britney.conf +++ b/britney.conf @@ -3,6 +3,7 @@ # Paths for control files TESTING = /srv/release.debian.org/britney/var/data-b2/testing TPU = /srv/release.debian.org/britney/var/data-b2/testing-proposed-updates +PU = /srv/release.debian.org/britney/var/data-b2/proposed-updates UNSTABLE = /srv/release.debian.org/britney/var/data-b2/unstable # Output From 84bad954ad05477f5abfe395937f6e298f383558 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Mon, 1 Jul 2013 18:13:51 +0000 Subject: [PATCH 5/7] Only record a package once in the source->binary package mapping If there are multiple versions of an arch:all package in unstable (due to outdated or no longer built arch:any packages) then only one of them should be recorded in the list of binary packages built from the source package. Otherwise we may try and remove the binary package from various lists multiple times, leading to crashes. Signed-off-by: Adam D. Barratt --- britney.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/britney.py b/britney.py index d9663b3..11c4480 100755 --- a/britney.py +++ b/britney.py @@ -555,12 +555,20 @@ class Britney(object): if "(" in source: dpkg[SOURCEVER] = source[source.find("(")+1:source.find(")")] + pkgarch = "%s/%s" % (pkg,arch) # if the source package is available in the distribution, then register this binary package if dpkg[SOURCE] in sources[distribution]: - sources[distribution][dpkg[SOURCE]][BINARIES].append(pkg + "/" + arch) + # There may be multiple versions of any arch:all packages + # (in unstable) if some architectures have out-of-date + # binaries. We only want to include the package in the + # source -> binary mapping once. It doesn't matter which + # of the versions we include as only the package name and + # architecture are recorded. + if pkgarch not in sources[distribution][dpkg[SOURCE]][BINARIES]: + sources[distribution][dpkg[SOURCE]][BINARIES].append(pkgarch) # if the source package doesn't exist, create a fake one else: - sources[distribution][dpkg[SOURCE]] = [dpkg[SOURCEVER], 'faux', [pkg + "/" + arch], None, True] + sources[distribution][dpkg[SOURCE]] = [dpkg[SOURCEVER], 'faux', [pkgarch], None, True] # register virtual packages and real packages that provide them if dpkg[PROVIDES]: From e99ea146012084eaf427b75a193af79a6026d967 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 5 Jul 2013 18:04:33 +0000 Subject: [PATCH 6/7] =?UTF-8?q?Don't=C2=A0crash=C2=A0on=C2=A0unversioned?= =?UTF-8?q?=C2=A0unblock=C2=A0hints.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adam D. Barratt --- britney.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/britney.py b/britney.py index 11c4480..84f2e63 100755 --- a/britney.py +++ b/britney.py @@ -1335,7 +1335,7 @@ class Britney(object): unblock_cmd = "un" + block_cmd unblocks = self.hints.search(unblock_cmd, package=src) - if unblocks and self.same_source(unblocks[0].version, source_u[VERSION]): + if unblocks and unblocks[0].version is not None and self.same_source(unblocks[0].version, source_u[VERSION]): if suite == 'unstable' or block_cmd == 'block-udeb': excuse.addhtml("Ignoring %s request by %s, due to %s request by %s" % (block_cmd, blocked[block_cmd].user, unblock_cmd, unblocks[0].user)) @@ -1343,8 +1343,12 @@ class Britney(object): excuse.addhtml("Approved by %s" % (unblocks[0].user)) else: if unblocks: - excuse.addhtml("%s request by %s ignored due to version mismatch: %s" % - (unblock_cmd.capitalize(), unblocks[0].user, unblocks[0].version)) + if unblocks[0].version is None: + excuse.addhtml("%s request by %s ignored due to missing version" % + (unblock_cmd.capitalize(), unblocks[0].user)) + else: + excuse.addhtml("%s request by %s ignored due to version mismatch: %s" % + (unblock_cmd.capitalize(), unblocks[0].user, unblocks[0].version)) if suite == 'unstable' or block_cmd == 'block-udeb': excuse.addhtml("Not touching package due to %s request by %s (contact debian-release if update is needed)" % (block_cmd, blocked[block_cmd].user)) From 33d905fc3a5354b98f743a5efbd8546ace834dc6 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 5 Jul 2013 18:06:40 +0000 Subject: [PATCH 7/7] =?UTF-8?q?Apply=C2=A0undo=C2=A0list=C2=A0in=C2=A0reve?= =?UTF-8?q?rse=C2=A0order.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In rare cases with hints with overlapping virtual packages provided by different sources, this can make a difference. Signed-off-by: Adam D. Barratt --- britney.py | 1 + 1 file changed, 1 insertion(+) diff --git a/britney.py b/britney.py index 84f2e63..a8af658 100755 --- a/britney.py +++ b/britney.py @@ -2326,6 +2326,7 @@ class Britney(object): else: self.output_write("FAILED\n") if not lundo: return + lundo.reverse() self.undo_changes(lundo, self.systems, self.sources, self.binaries)