From 2034272f1c7f7ae9ac1b015d4b1d84fa39444ee2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 29 Oct 2012 16:48:49 +0000 Subject: [PATCH] handle binary-only promotions when writing delta --- britney.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/britney.py b/britney.py index c0af356..56561e3 100755 --- a/britney.py +++ b/britney.py @@ -938,11 +938,20 @@ class Britney(object): f = open(filename, "w") sources = self.sources['testing'] - for src_name in self.all_selected: - if src_name in sources: - f.write('%s %s\n' % (src_name, sources[src_name][VERSION])) + binaries = self.binaries['testing'] + for name in self.all_selected: + if "/" in name: + pkg_name, arch = name.split('/', 1) + if arch in binaries and pkg_name in binaries[arch][0]: + f.write('%s %s\n' % + (name, binaries[arch][0][pkg_name][VERSION])) + else: + f.write('%s\n' % name) else: - f.write('%s\n' % src_name) + if name in sources: + f.write('%s %s\n' % (name, sources[name][VERSION])) + else: + f.write('%s\n' % name) f.close()