summaryrefslogtreecommitdiff
path: root/portato/backend/portage/package.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/backend/portage/package.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 9f40137..d22d203 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -163,7 +163,7 @@ class PortagePackage (Package):
return retlist
- def get_dep_packages (self, depvar = ["RDEPEND", "PDEPEND", "DEPEND"]):
+ def get_dep_packages (self, depvar = ["RDEPEND", "PDEPEND", "DEPEND"], with_criterions = False):
dep_pkgs = [] # the package list
# change the useflags, because we have internally changed some, but not made them visible for portage
@@ -192,6 +192,14 @@ class PortagePackage (Package):
deps = deps[1]
+ def create_dep_pkgs_data (dep, pkg):
+ """Returns the data to enter into the dep_pkgs list, which is either the package cpv or a tuple
+ consisting of the cpv and the criterion."""
+ if with_criterions:
+ return (pkg.get_cpv(), dep)
+ else:
+ return pkg.get_cpv()
+
for dep in deps:
if dep[0] == '!': # blocking sth
dep = dep[1:]
@@ -212,13 +220,13 @@ class PortagePackage (Package):
for i in range(len(list)-1,0,-1):
p = list[i]
if not p.is_masked():
- dep_pkgs.append(p.get_cpv())
+ dep_pkgs.append(create_dep_pkgs_data(dep, p))
done = True
break
if not done:
- dep_pkgs.append(list[-1].get_cpv())
+ dep_pkgs.append(create_dep_pkgs_data(dep, list[-1]))
else:
- dep_pkgs.append(pkg.get_cpv())
+ dep_pkgs.append(create_dep_pkgs_data(dep, pkg))
return dep_pkgs
@@ -262,7 +270,4 @@ class PortagePackage (Package):
return portage.pkgcmp(v1[1:],v2[1:])
def matches (self, criterion):
- if portage.match_from_list(criterion, [self.get_cpv()]) == []:
- return False
- else:
- return True
+ return system.cpv_matches(self.get_cpv(), criterion)
é 'Necoro' Neumann1-2/+2 2013-10-22cwd-spawn: Use M-Return instead of M-o for consistency.René 'Necoro' Neumann1-2/+2 2013-10-22Add cwd-spawn to urxvt to allow spawning a new terminal from the currentRené 'Necoro' Neumann3-2/+199 2013-10-22Use chpwd_functions and precmd_functions instead of putting everything inRené 'Necoro' Neumann1-19/+23 2013-09-30urxvt: execute the wgetpaste check each timeRené 'Necoro' Neumann1-2/+5 2013-09-30urxvt: wgetpaste fixRené 'Necoro' Neumann1-4/+4 2013-09-30Allow HOME variable in .Xresources.René 'Necoro' Neumann2-3/+3 2013-09-30wgetpaste support for urxvt.René 'Necoro' Neumann2-1/+28 2013-09-30Urxvt autotransform for <filename>:<line>.René 'Necoro' Neumann1-1/+4 2013-09-30Remove tabbed(x) from urxvt. We use i3 -- no need for it.René 'Necoro' Neumann1-9/+0 2013-09-30Do not display icon in urxvt. It's not supported by i3 anyway.René 'Necoro' Neumann1-1/+1 2013-09-29Remove wrong monitors lineRené 'Necoro' Neumann1-1/+0 2013-09-29Delete vimperator paste plugin -- seems not to work anymore with new FFRené 'Necoro' Neumann1-266/+0 2013-09-29Use $HOST instead of Cauchiy in titleRené 'Necoro' Neumann1-1/+1 2013-09-24Remove herbstluftwmRené 'Necoro' Neumann1-1/+0 2013-09-24Conky changesRené 'Necoro' Neumann2-5/+13 2013-09-15Remove trailing slash from \~ulpRené 'Necoro' Neumann1-1/+1 2013-09-15Make cci explicitly use python2René 'Necoro' Neumann1-1/+1 2013-09-10Node/NPM preparationRené 'Necoro' Neumann3-1/+13