summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-11 11:06:21 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-11 11:06:21 +0200
commit2776b35a9a93d21a65ae005296f82e675336b0dc (patch)
tree731fc7b4661e7203b4cd5a5502fe2b1cf2ce0af7
parentbcfae28b842f76bfec2134f9d7f01942fc1c57c6 (diff)
downloadportato-2776b35a9a93d21a65ae005296f82e675336b0dc.tar.gz
portato-2776b35a9a93d21a65ae005296f82e675336b0dc.tar.bz2
portato-2776b35a9a93d21a65ae005296f82e675336b0dc.zip
Fix handling of slots in /etc/portage/*
-rw-r--r--portato/backend/flags.py2
-rw-r--r--portato/backend/portage/package.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index 51e5289..9c5b93d 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -115,7 +115,7 @@ def get_data(pkg, path):
flags = []
for line in grep(pkg, path):
- file, line, fl = line.split(":") # get file, line and flag-list
+ file, line, fl = line.split(":", 2) # get file, line and flag-list
fl = fl.split()
crit = fl[0]
fl = fl[1:]
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 502ee2b..2b40e41 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -308,4 +308,6 @@ class PortagePackage (Package):
return portage.pkgcmp(v1[1:],v2[1:])
def matches (self, criterion):
- return system.cpv_matches(self.get_cpv(), criterion)
+ # cpv_matches needs explicit slot info
+ scpv = "%s:%s" % (self.get_cpv(), self.get_package_settings("SLOT"))
+ return system.cpv_matches(scpv, criterion)