summaryrefslogtreecommitdiff
path: root/portato/backend/portage/system.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-09-06 17:47:26 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-09-06 17:47:26 +0200
commit4ac3a9d99ffe2a7763f2f109903866ed56f52842 (patch)
tree74680ea1bec1792c53813c98601dd674fa09faee /portato/backend/portage/system.py
parentefccd35b43ab610e762d353bc917d3afb17c9a61 (diff)
parentb8078063684b5683126cf9bd5b09808666b91af8 (diff)
downloadportato-4ac3a9d99ffe2a7763f2f109903866ed56f52842.tar.gz
portato-4ac3a9d99ffe2a7763f2f109903866ed56f52842.tar.bz2
portato-4ac3a9d99ffe2a7763f2f109903866ed56f52842.zip
Merged 0.14.1
Diffstat (limited to 'portato/backend/portage/system.py')
-rw-r--r--portato/backend/portage/system.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index a7fea5d..54d0021 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -224,7 +224,11 @@ class PortageSystem (SystemInterface):
return list(filter(self.find_lambda(name), categories))
def split_cpv (self, cpv):
- cpv = portage.dep_getcpv(cpv)
+ try:
+ cpv = portage.dep_getcpv(cpv)
+ except portage.exception.InvalidAtom:
+ pass
+
return portage.catpkgsplit(cpv)
def sort_package_list(self, pkglist, only_cpv = False):
@@ -274,12 +278,15 @@ class PortageSystem (SystemInterface):
if len(inst) > 1:
myslots = set()
+ splitp = p.split('[', 1) # split away the useflags
for i in inst: # get the slots of the installed packages
myslots.add(i.get_slot())
myslots.add(best_p.get_slot()) # add the slot of the best package in portage
for slot in myslots:
- crit = "%s:%s" % (p, slot)
+ crit = splitp[:]
+ crit[0] = "%s:%s" % (crit[0], slot)
+ crit = "[".join(crit) # re-add possible useflags
append(crit, self.find_best_match(crit), inst)
else:
append(p, best_p, inst)