From 9327529ba8789af6fc1950c94221469d130748e4 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Thu, 15 Dec 2011 19:26:45 +0000 Subject: [PATCH] Automatically remove obsolete source packages from testing. An "obsolete source" is one which produces no binaries. This situation generally arises when all of the binaries which used to be produced by the source package are now built by other sources. Sooner or later such sources will probably be auto-crufted from unstable, but there's no real reason to keep them in testing in the meantime. Signed-off-by: Adam D. Barratt --- britney.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/britney.py b/britney.py index bf4df8b..bb3fed8 100755 --- a/britney.py +++ b/britney.py @@ -2408,6 +2408,17 @@ class Britney: if not self.options.compatible or self.options.autohinter: self.auto_hinter() + # obsolete source packages + if not self.options.compatible: + self.__log("> Removing obsolete source packages from testing", type="I") + removals = [] + sources = self.sources['testing'] + removals = [ HintItem("-%s/%s" % (source, sources[source][VERSION])) for \ + source in sources if len(sources[source][BINARIES]) == 0 ] + if len(removals) > 0: + self.output_write("Removing obsolete source packages from testing (%d):\n" % (len(removals))) + self.do_all(actions=removals) + # smooth updates if not self.options.compatible and len(self.options.smooth_updates) > 0: self.__log("> Removing old packages left in testing from smooth updates", type="I")