projects
/
gentoolkit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aec0e3
)
Fix get_provide() method to also work for uninstalled packages
author
fuzzyray
<fuzzyray@gentoo.org>
Tue, 2 Jan 2007 20:57:36 +0000
(20:57 -0000)
committer
fuzzyray
<fuzzyray@gentoo.org>
Tue, 2 Jan 2007 20:57:36 +0000
(20:57 -0000)
svn path=/; revision=332
trunk/src/gentoolkit/package.py
patch
|
blob
|
history
diff --git
a/trunk/src/gentoolkit/package.py
b/trunk/src/gentoolkit/package.py
index d583c8a51ed13689a46280aaaaa9842525aceeac..87fef28981a7bfd3a427a50621fc2c0979a30978 100644
(file)
--- a/
trunk/src/gentoolkit/package.py
+++ b/
trunk/src/gentoolkit/package.py
@@
-56,7
+56,14
@@
class Package:
def get_provide(self):
"""Return a list of provides, if any"""
- return vartree.get_provide(self._cpv)
+ if not self.is_installed():
+ try:
+ x = [self.get_env_var('PROVIDE')]
+ except KeyError:
+ x = []
+ return x
+ else:
+ return vartree.get_provide(self._cpv)
def get_dependants(self):
"""Retrieves a list of CPVs for all packages depending on this one"""