summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-03-22 16:14:49 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-03-22 11:15:11 -0500
commit884d6343e625212257b7c1a87188891924d32021 (patch)
treec7e05af736bf74d7bc0a76b185a04a75b84d2ac5 /src/lib/Client
parentbae5d0f8ff6b762071b5a00a18b8d4453652e665 (diff)
downloadbcfg2-884d6343e625212257b7c1a87188891924d32021.tar.gz
bcfg2-884d6343e625212257b7c1a87188891924d32021.tar.bz2
bcfg2-884d6343e625212257b7c1a87188891924d32021.zip
Portage.py: Fix equery usage for newer versions of gentoolkit (Patch from Philipp Riegger)
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5784 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Tools/Portage.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/Portage.py b/src/lib/Client/Tools/Portage.py
index 9dc9df8ff..d87fc30d4 100644
--- a/src/lib/Client/Tools/Portage.py
+++ b/src/lib/Client/Tools/Portage.py
@@ -24,7 +24,9 @@ class Portage(Bcfg2.Client.Tools.PkgTool):
def RefreshPackages(self):
'''Refresh memory hashes of packages'''
- cache = self.cmd.run("equery -q list")[1]
+ ret, cache = self.cmd.run("equery -q list")
+ if ret == 2:
+ cache = self.cmd.run("equery -q list '*'")[1]
pattern = re.compile('(.*)-(\d.*)')
self.installed = {}
for pkg in cache: