[Yum-devel] [PATCH] sort the files output too - it takes a bit more time but it makes things easier to read :)

Seth Vidal skvidal at fedoraproject.org
Fri Jul 15 21:44:55 UTC 2011


---
 yum/packages.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/yum/packages.py b/yum/packages.py
index db365c5..79c15db 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -1161,11 +1161,11 @@ class YumAvailablePackage(PackageObject, RpmBase):
             dirs = self.returnFileEntries('dir', primary_only=True)
             ghosts = self.returnFileEntries('ghost', primary_only=True)
                 
-        for fn in files:
+        for fn in sorted(files):
             msg += """    <file>%s</file>\n""" % misc.to_xml(fn)
-        for fn in dirs:
+        for fn in sorted(dirs):
             msg += """    <file type="dir">%s</file>\n""" % misc.to_xml(fn)
-        for fn in ghosts:
+        for fn in sorted(ghosts):
             msg += """    <file type="ghost">%s</file>\n""" % misc.to_xml(fn)
         
         return msg
-- 
1.7.4.4



More information about the Yum-devel mailing list