]> git.ipfire.org Git - pakfire.git/commitdiff
Download packages in alphabetical order.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Aug 2011 16:06:16 +0000 (18:06 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Aug 2011 16:06:16 +0000 (18:06 +0200)
It just looks much nicer.

pakfire/actions.py
pakfire/transaction.py
po/pakfire.pot

index 9507eb781d98b920bd1806311c81dcfeec03dbf6..9a6c5c2e178dce946f674aee58e0f97c8473182e 100644 (file)
@@ -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)
 
index ed1362b1e1a2eb581134a383f7eb34b0c7f0e439..5dd9d5f0e4c73906a733981b5c47bbbdfbae9e4c 100644 (file)
@@ -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.
index 865f4bc3f2d5e7cf0b8d72dfa5da65944dc19410..10bc2eb50eb7e636e4808c13161593717763fc45 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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 ""