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

tim.lauridsen at gmail.com tim.lauridsen at gmail.com
Sat Jul 16 08:23:33 UTC 2011


On Fri, Jul 15, 2011 at 11:44 PM, Seth Vidal <skvidal at fedoraproject.org> wrote:
> ---
>  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
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>

ACK


More information about the Yum-devel mailing list