From e6080239db72c7d04b1fe81aa666b2eb379028a1 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Wed, 8 Nov 2006 21:16:33 +0000 Subject: fixed small bug if a package is blocking itself --- geneticone/backend/package.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'geneticone') diff --git a/geneticone/backend/package.py b/geneticone/backend/package.py index d628a56..212dffa 100644 --- a/geneticone/backend/package.py +++ b/geneticone/backend/package.py @@ -274,11 +274,12 @@ class Package (gentoolkit.Package): for dep in deps: if dep[0] == '!': # blocking sth - blocked = find_installed_packages(dep[1:]) - if blocked != []: - raise BlockedException, (self.get_cpv(), blocked[0].get_cpv()) - else: # next flag - continue + dep = dep[1:] + if dep != self.get_cp(): # not cpv, because a version might explicitly block another one + blocked = find_installed_packages(dep) + if blocked != []: + raise BlockedException, (self.get_cpv(), blocked[0].get_cpv()) + continue # finished with the blocking one -> next pkg = find_best_match(dep) if not pkg: # try to find masked ones -- cgit v1.2.3-70-g09d2