From aa9f2645f1f5bf5f88a22c70ad8cbca8da07e4ac Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 6 Aug 2011 18:06:16 +0200 Subject: [PATCH] Download packages in alphabetical order. It just looks much nicer. --- pakfire/actions.py | 3 +++ pakfire/transaction.py | 2 +- po/pakfire.pot | 12 ++++++------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pakfire/actions.py b/pakfire/actions.py index 9507eb781..9a6c5c2e1 100644 --- a/pakfire/actions.py +++ b/pakfire/actions.py @@ -37,6 +37,9 @@ class Action(object): if binary_package: self.pkg = binary_package + def __cmp__(self, other): + return cmp(self.pkg, other.pkg) + def __repr__(self): return "<%s %s>" % (self.__class__.__name__, self.pkg.friendly_name) diff --git a/pakfire/transaction.py b/pakfire/transaction.py index ed1362b1e..5dd9d5f0e 100644 --- a/pakfire/transaction.py +++ b/pakfire/transaction.py @@ -114,7 +114,7 @@ class Transaction(object): @property def downloads(self): - return [a for a in self.actions if a.needs_download] + return sorted([a for a in self.actions if a.needs_download]) def download(self): # Get all download actions as a list. diff --git a/po/pakfire.pot b/po/pakfire.pot index 865f4bc3f..10bc2eb50 100644 --- a/po/pakfire.pot +++ b/po/pakfire.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-08-06 17:57+0200\n" +"POT-Creation-Date: 2011-08-06 18:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,24 +17,24 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../pakfire/actions.py:120 ../pakfire/actions.py:177 +#: ../pakfire/actions.py:123 ../pakfire/actions.py:180 msgid "Installing" msgstr "" -#: ../pakfire/actions.py:130 +#: ../pakfire/actions.py:133 msgid "Updating" msgstr "" -#: ../pakfire/actions.py:144 +#: ../pakfire/actions.py:147 msgid "Removing" msgstr "" #. Cleaning up leftover files and stuff. -#: ../pakfire/actions.py:162 +#: ../pakfire/actions.py:165 msgid "Cleanup" msgstr "" -#: ../pakfire/actions.py:187 +#: ../pakfire/actions.py:190 msgid "Downgrading" msgstr "" -- 2.39.5