diff options
author | David Malcolm <[email protected]> | 2009-12-05 09:51:48 -0500 |
---|---|---|
committer | David Malcolm <[email protected]> | 2009-12-05 09:51:48 -0500 |
commit | 3acf0c0b601033194db225c8a15bf843742f1be0 (patch) | |
tree | d5440451349541a329c1470b765f2a3ed196c526 | |
parent | 2ea35e07d4d51a8e959805049606beb36364bdc7 (diff) | |
download | triage-3acf0c0b601033194db225c8a15bf843742f1be0.tar.gz triage-3acf0c0b601033194db225c8a15bf843742f1be0.tar.xz triage-3acf0c0b601033194db225c8a15bf843742f1be0.zip |
setSearchPath() on YumBase instance, to avoid needing root for write access to shared yum cache
-rwxr-xr-x | abrt-triage.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/abrt-triage.py b/abrt-triage.py index 70834d6..703f100 100755 --- a/abrt-triage.py +++ b/abrt-triage.py @@ -141,7 +141,9 @@ def what_provides_file(path): #(stdout, stderr) = p.communicate() #print repr(stdout) import yum - for pkg, path in yum.YumBase().searchPackageProvides([path]).iteritems(): + my = yum.YumBase() + my.setCacheDir() + for pkg, path in my.searchPackageProvides([path]).iteritems(): #pprint(pkg.__dict__) return pkg.name # this is the subpackage, not the srpm |