From c571e8fdba5199761014077141d34a9cdb239e3d Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Tue, 3 Apr 2012 21:44:32 +0000 Subject: [PATCH] Fix "block-all source" handling Signed-off-by: Adam D. Barratt --- britney.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/britney.py b/britney.py index 484c690..6942003 100755 --- a/britney.py +++ b/britney.py @@ -4,7 +4,7 @@ # Copyright (C) 2001-2008 Anthony Towns # Andreas Barth # Fabio Tranchitella -# Copyright (C) 2010-2011 Adam D. Barratt +# Copyright (C) 2010-2012 Adam D. Barratt # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1289,10 +1289,12 @@ class Britney(object): # check if there is a `block' or `block-udeb' hint for this package, or a `block-all source' hint blocked = {} for hint in self.hints.search(package=src): - if hint.type == 'block' or (hint.type == 'block-all' and hint.package == 'source' and hint not in blocked['block']): + if hint.type == 'block': blocked['block'] = hint if hint.type == 'block-udeb': blocked['block-udeb'] = hint + for hint in self.hints.search(type='block-all', package='source'): + blocked.setdefault('block', hint) # if the source is blocked, then look for an `unblock' hint; the unblock request # is processed only if the specified version is correct. If a package is blocked