[yum-commits] 2 commits - yum-debug-dump.py
James Antill
james at osuosl.org
Fri Oct 10 18:55:46 UTC 2008
yum-debug-dump.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit a6d77d102a5391e151d5e15af3e1500a73dac4b2
Author: James Antill <james at and.org>
Date: Fri Oct 10 14:50:12 2008 -0400
Sort the dump output, to it's consistent
diff --git a/yum-debug-dump.py b/yum-debug-dump.py
index a826ad5..1797026 100644
--- a/yum-debug-dump.py
+++ b/yum-debug-dump.py
@@ -45,18 +45,18 @@ class YumDebugDump(yum.YumBase):
def dump_rpmdb(self):
msg = "%%%%RPMDB\n"
- for po in self.rpmdb:
+ for po in sorted(self.rpmdb):
msg += ' %s:%s-%s-%s.%s\n' % (po.epoch, po.name, po.ver,po.rel, po.arch)
return msg
def dump_repos(self):
msg = "%%%%REPOS\n"
- for repo in self.repos.listEnabled():
+ for repo in sorted(self.repos.listEnabled()):
try:
msg += '%%%s - %s\n' % (repo.id, repo.urls[0])
msg += " excludes: %s\n" % ",".join(repo.exclude)
- for po in self.pkgSack.returnPackages(repo.id):
+ for po in sorted(self.pkgSack.returnPackages(repo.id)):
msg += ' %s:%s-%s-%s.%s\n' % (po.epoch, po.name, po.ver,po.rel, po.arch)
except Errors.RepoError, e:
msg += "Error accessing repo %s: %s\n" % (repo, str(e))
@@ -98,7 +98,7 @@ class YumDebugDump(yum.YumBase):
providers = {} # To speed depsolving, don't recheck deps that have
# already been checked
provsomething = {}
- for (pkg,reqs) in pkgs.items():
+ for (pkg,reqs) in sorted(pkgs.items()):
for (req,flags,ver) in reqs:
if ver == '':
ver = None
@@ -124,7 +124,6 @@ class YumDebugDump(yum.YumBase):
# package has the same requirement
providers[(req,rflags,ver)] = resolve_sack
-
msg = "%%%%RPMDB PROBLEMS\n"
for error in errors:
msg += "%s\n" % error
@@ -132,8 +131,6 @@ class YumDebugDump(yum.YumBase):
# possibly list all verify failures, too
return msg
-
-
def create_debug_file(self, fn=None):
"""create debug txt file and compress it, place it at yum_debug_dump.txt.gz
unless fn is specified"""
commit 2b721efcc2deeed8ac59a51411e2024b4ebba97f
Author: James Antill <james at and.org>
Date: Fri Oct 10 14:48:12 2008 -0400
Enable plugins, so we can print out which are enabled (and spacewalk works)
diff --git a/yum-debug-dump.py b/yum-debug-dump.py
index c278e93..a826ad5 100644
--- a/yum-debug-dump.py
+++ b/yum-debug-dump.py
@@ -158,6 +158,7 @@ class YumDebugDump(yum.YumBase):
def main():
my = YumDebugDump()
+ my.doConfigSetup(init_plugins=True)
fn = my.create_debug_file()
print "Output written to: %s" % fn
More information about the Yum-commits
mailing list