[Yum] PATCH simuleneous download for packages

pranjal pandit pranjal5215 at gmail.com
Sun Apr 26 19:28:17 UTC 2009


Hello,
The patch attached performs simultaneous downloads of packages by
creating two different urlgrab objects and passing them different
package names to download.

The download is fine but there is a problem in display in case of
simultaneous downloads of  more than one packages. The display
percentages and download speed is shown incorrect. The progress object
used is of class TextMeter() from the module urlgrabber.progress.

In case of a single package download, the code works perfectly fine.

--Regards
--Pranjal Pandit
Computer Science Engineering Department
NIT HAMIRPUR
-------------- next part --------------
diff --git a/cli.py b/cli.py
index 0374667..cb8507c 100644
--- a/cli.py
+++ b/cli.py
@@ -25,9 +25,9 @@ import sys
 import time
 import random
 import logging
+import threading
 from optparse import OptionParser
 import rpm
-
 import output
 import shell
 import yum
@@ -62,7 +62,7 @@ class CliError(yum.Errors.YumBaseError):
         yum.Errors.YumBaseError.__init__(self)
         self.args = args
 
-class YumBaseCli(yum.YumBase, output.YumOutput):
+class YumBaseCli(yum.YumBase, output.YumOutput,threading.Thread):
     """This is the base class for yum cli.
        Inherits from yum.YumBase and output.YumOutput """
        
@@ -98,7 +98,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
         self.registerCommand(yumcommands.RepoListCommand())
         self.registerCommand(yumcommands.HelpCommand())
         self.registerCommand(yumcommands.ReInstallCommand())        
-
+        self.helpDownloadPkgs=yum.HDP()
+        self.yB=yum.YumBase()
+        threading.Thread.__init__(self)
+    def run(self):
+        self.yB.downloadPkgs2(self.helpDownloadPkgs)
     def registerCommand(self, command):
         for name in command.getNames():
             if self.yum_cli_commands.has_key(name):
@@ -396,8 +400,22 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
 
         self.verbose_logger.log(yum.logginglevels.INFO_2,
             _('Downloading Packages:'))
-        problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb) 
-
+        
+        self.yB.downloadPkgs1(downloadpkgs,self.helpDownloadPkgs)
+
+        if self.yB.numberOfPackages() is 1:
+            self.yB.downloadPkgs2(self.helpDownloadPkgs)
+        else:    
+            call1=YumBaseCli()
+            call2=YumBaseCli()
+            cl=[]
+            cl.append(call1)
+            cl.append(call2)
+            call1.start()
+            call2.start()
+            for c in cl:
+                c.join()
+        problems = self.yB.downloadPkgs3()
         if len(problems) > 0:
             errstring = ''
             errstring += _('Error Downloading Packages:\n')
diff --git a/po/yum.pot b/po/yum.pot
index 9e01e13..c868dc9 100644
--- a/po/yum.pot
+++ b/po/yum.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-03-25 11:29+0100\n"
+"POT-Creation-Date: 2009-03-08 01:53+0530\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,23 +16,24 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../callback.py:48 ../output.py:512
+#: ../callback.py:48 ../output.py:911 ../yum/rpmtrans.py:71
 msgid "Updating"
 msgstr ""
 
-#: ../callback.py:49
+#: ../callback.py:49 ../yum/rpmtrans.py:72
 msgid "Erasing"
 msgstr ""
 
-#: ../callback.py:50 ../callback.py:51 ../callback.py:53 ../output.py:511
+#: ../callback.py:50 ../callback.py:51 ../callback.py:53 ../output.py:910
+#: ../yum/rpmtrans.py:73 ../yum/rpmtrans.py:74 ../yum/rpmtrans.py:76
 msgid "Installing"
 msgstr ""
 
-#: ../callback.py:52 ../callback.py:58
+#: ../callback.py:52 ../callback.py:58 ../yum/rpmtrans.py:75
 msgid "Obsoleted"
 msgstr ""
 
-#: ../callback.py:54 ../output.py:558
+#: ../callback.py:54 ../output.py:1016
 msgid "Updated"
 msgstr ""
 
@@ -40,7 +41,7 @@ msgstr ""
 msgid "Erased"
 msgstr ""
 
-#: ../callback.py:56 ../callback.py:57 ../callback.py:59 ../output.py:556
+#: ../callback.py:56 ../callback.py:57 ../callback.py:59 ../output.py:1014
 msgid "Installed"
 msgstr ""
 
@@ -62,615 +63,710 @@ msgstr ""
 msgid "Erased: %s"
 msgstr ""
 
-#: ../callback.py:217 ../output.py:513
+#: ../callback.py:217 ../output.py:912
 msgid "Removing"
 msgstr ""
 
-#: ../callback.py:219
+#: ../callback.py:219 ../yum/rpmtrans.py:77
 msgid "Cleanup"
 msgstr ""
 
-#: ../cli.py:103
+#: ../cli.py:105
 #, python-format
 msgid "Command \"%s\" already defined"
 msgstr ""
 
-#: ../cli.py:115
+#: ../cli.py:117
 msgid "Setting up repositories"
 msgstr ""
 
-#: ../cli.py:126
+#: ../cli.py:128
 msgid "Reading repository metadata in from local files"
 msgstr ""
 
-#: ../cli.py:183 ../utils.py:72
+#: ../cli.py:188 ../utils.py:79
 #, python-format
 msgid "Config Error: %s"
 msgstr ""
 
-#: ../cli.py:186 ../cli.py:1068 ../utils.py:75
+#: ../cli.py:191 ../cli.py:1171 ../utils.py:82
 #, python-format
 msgid "Options Error: %s"
 msgstr ""
 
-#: ../cli.py:229
+#: ../cli.py:219
+#, python-format
+msgid "  Installed: %s-%s at %s"
+msgstr ""
+
+#: ../cli.py:221
+#, python-format
+msgid "  Built    : %s at %s"
+msgstr ""
+
+#: ../cli.py:223
+#, python-format
+msgid "  Committed: %s at %s"
+msgstr ""
+
+#: ../cli.py:260
 msgid "You need to give some command"
 msgstr ""
 
-#: ../cli.py:271
+#: ../cli.py:302
 msgid "Disk Requirements:\n"
 msgstr ""
 
-#: ../cli.py:273
+#: ../cli.py:304
 #, python-format
 msgid "  At least %dMB needed on the %s filesystem.\n"
 msgstr ""
 
 #. TODO: simplify the dependency errors?
 #. Fixup the summary
-#: ../cli.py:278
+#: ../cli.py:309
 msgid ""
 "Error Summary\n"
 "-------------\n"
 msgstr ""
 
-#: ../cli.py:317
+#: ../cli.py:352
 msgid "Trying to run the transaction but nothing to do. Exiting."
 msgstr ""
 
-#: ../cli.py:347
+#: ../cli.py:382
 msgid "Exiting on user Command"
 msgstr ""
 
-#: ../cli.py:351
+#: ../cli.py:386
 msgid "Downloading Packages:"
 msgstr ""
 
-#: ../cli.py:356
+#: ../cli.py:391
 msgid "Error Downloading Packages:\n"
 msgstr ""
 
-#: ../cli.py:370 ../yum/__init__.py:2746
+#: ../cli.py:405 ../yum/__init__.py:3331
 msgid "Running rpm_check_debug"
 msgstr ""
 
-#: ../cli.py:373 ../yum/__init__.py:2749
+#: ../cli.py:408 ../yum/__init__.py:3334
 msgid "ERROR with rpm_check_debug vs depsolve:"
 msgstr ""
 
-#: ../cli.py:377 ../yum/__init__.py:2751
-msgid "Please report this error in bugzilla"
+#: ../cli.py:412
+#, python-format
+msgid "Please report this error in %s"
 msgstr ""
 
-#: ../cli.py:383
+#: ../cli.py:418
 msgid "Running Transaction Test"
 msgstr ""
 
-#: ../cli.py:399
+#: ../cli.py:434
 msgid "Finished Transaction Test"
 msgstr ""
 
-#: ../cli.py:401
+#: ../cli.py:436
 msgid "Transaction Check Error:\n"
 msgstr ""
 
-#: ../cli.py:408
+#: ../cli.py:443
 msgid "Transaction Test Succeeded"
 msgstr ""
 
-#: ../cli.py:429
+#: ../cli.py:464
 msgid "Running Transaction"
 msgstr ""
 
-#: ../cli.py:459
+#: ../cli.py:494
 msgid ""
 "Refusing to automatically import keys when running unattended.\n"
 "Use \"-y\" to override."
 msgstr ""
 
-#: ../cli.py:491
-msgid "Parsing package install arguments"
+#: ../cli.py:513 ../cli.py:547
+msgid "  * Maybe you meant: "
 msgstr ""
 
-#: ../cli.py:501
+#: ../cli.py:530 ../cli.py:538
 #, python-format
-msgid "No package %s available."
+msgid "Package(s) %s%s%s available, but not installed."
 msgstr ""
 
-#: ../cli.py:505 ../cli.py:623 ../yumcommands.py:748
-msgid "Package(s) to install"
+#: ../cli.py:544 ../cli.py:579
+#, python-format
+msgid "No package %s%s%s available."
 msgstr ""
 
-#: ../cli.py:506 ../cli.py:624 ../yumcommands.py:146 ../yumcommands.py:749
-msgid "Nothing to do"
+#: ../cli.py:569
+msgid "Parsing package install arguments"
 msgstr ""
 
-#: ../cli.py:536 ../yum/__init__.py:2232 ../yum/__init__.py:2311
-#: ../yum/__init__.py:2340
-#, python-format
-msgid "Not Updating Package that is already obsoleted: %s.%s %s:%s-%s"
+#: ../cli.py:584 ../cli.py:659 ../yumcommands.py:984
+msgid "Package(s) to install"
 msgstr ""
 
-#: ../cli.py:568
-#, python-format
-msgid "Could not find update match for %s"
+#: ../cli.py:585 ../cli.py:660 ../yumcommands.py:151 ../yumcommands.py:985
+msgid "Nothing to do"
 msgstr ""
 
-#: ../cli.py:580
+#: ../cli.py:618
 #, python-format
 msgid "%d packages marked for Update"
 msgstr ""
 
-#: ../cli.py:583
+#: ../cli.py:621
 msgid "No Packages marked for Update"
 msgstr ""
 
-#: ../cli.py:599
+#: ../cli.py:635
 #, python-format
 msgid "%d packages marked for removal"
 msgstr ""
 
-#: ../cli.py:602
+#: ../cli.py:638
 msgid "No Packages marked for removal"
 msgstr ""
 
-#: ../cli.py:614
+#: ../cli.py:650
 msgid "No Packages Provided"
 msgstr ""
 
-#: ../cli.py:654
+#: ../cli.py:705
 msgid "Matching packages for package list to user args"
 msgstr ""
 
-#: ../cli.py:701
+#: ../cli.py:754
 #, python-format
 msgid "Warning: No matches found for: %s"
 msgstr ""
 
-#: ../cli.py:704
+#: ../cli.py:757
 msgid "No Matches found"
 msgstr ""
 
-#: ../cli.py:745
+#: ../cli.py:796
+#, python-format
+msgid ""
+"Warning: 3.0.x versions of yum would erronously match against filenames.\n"
+" You can use \"%s*/%s%s\" and/or \"%s*bin/%s%s\" to get that behaviour"
+msgstr ""
+
+#: ../cli.py:812
 #, python-format
 msgid "No Package Found for %s"
 msgstr ""
 
-#: ../cli.py:757
+#: ../cli.py:824
 msgid "Cleaning up Everything"
 msgstr ""
 
-#: ../cli.py:771
+#: ../cli.py:838
 msgid "Cleaning up Headers"
 msgstr ""
 
-#: ../cli.py:774
+#: ../cli.py:841
 msgid "Cleaning up Packages"
 msgstr ""
 
-#: ../cli.py:777
+#: ../cli.py:844
 msgid "Cleaning up xml metadata"
 msgstr ""
 
-#: ../cli.py:780
+#: ../cli.py:847
 msgid "Cleaning up database cache"
 msgstr ""
 
-#: ../cli.py:783
+#: ../cli.py:850
 msgid "Cleaning up expire-cache metadata"
 msgstr ""
 
-#: ../cli.py:786
+#: ../cli.py:853
 msgid "Cleaning up plugins"
 msgstr ""
 
-#: ../cli.py:807
+#: ../cli.py:878
 msgid "Installed Groups:"
 msgstr ""
 
-#: ../cli.py:814
+#: ../cli.py:885
 msgid "Available Groups:"
 msgstr ""
 
-#: ../cli.py:820
+#: ../cli.py:891
 msgid "Done"
 msgstr ""
 
-#: ../cli.py:829 ../cli.py:841 ../cli.py:847
+#: ../cli.py:902 ../cli.py:920 ../cli.py:926 ../yum/__init__.py:2390
 #, python-format
 msgid "Warning: Group %s does not exist."
 msgstr ""
 
-#: ../cli.py:853
+#: ../cli.py:930
 msgid "No packages in any requested group available to install or update"
 msgstr ""
 
-#: ../cli.py:855
+#: ../cli.py:932
 #, python-format
 msgid "%d Package(s) to Install"
 msgstr ""
 
-#: ../cli.py:865
+#: ../cli.py:942 ../yum/__init__.py:2402
 #, python-format
 msgid "No group named %s exists"
 msgstr ""
 
-#: ../cli.py:871
+#: ../cli.py:948
 msgid "No packages to remove from groups"
 msgstr ""
 
-#: ../cli.py:873
+#: ../cli.py:950
 #, python-format
 msgid "%d Package(s) to remove"
 msgstr ""
 
-#: ../cli.py:915
+#: ../cli.py:992
 #, python-format
 msgid "Package %s is already installed, skipping"
 msgstr ""
 
-#: ../cli.py:926
+#: ../cli.py:1003
 #, python-format
 msgid "Discarding non-comparable pkg %s.%s"
 msgstr ""
 
 #. we've not got any installed that match n or n+a
-#: ../cli.py:952
+#: ../cli.py:1029
 #, python-format
 msgid "No other %s installed, adding to list for potential install"
 msgstr ""
 
-#: ../cli.py:971
+#: ../cli.py:1048
 #, python-format
 msgid "Command line error: %s"
 msgstr ""
 
-#: ../cli.py:1101
+#: ../cli.py:1061
+#, python-format
+msgid ""
+"\n"
+"\n"
+"%s: %s option requires an argument"
+msgstr ""
+
+#: ../cli.py:1111
+msgid "--color takes one of: auto, always, never"
+msgstr ""
+
+#: ../cli.py:1213
+msgid "show this help message and exit"
+msgstr ""
+
+#: ../cli.py:1217
 msgid "be tolerant of errors"
 msgstr ""
 
-#: ../cli.py:1103
+#: ../cli.py:1219
 msgid "run entirely from cache, don't update cache"
 msgstr ""
 
-#: ../cli.py:1105
+#: ../cli.py:1221
 msgid "config file location"
 msgstr ""
 
-#: ../cli.py:1107
+#: ../cli.py:1223
 msgid "maximum command wait time"
 msgstr ""
 
-#: ../cli.py:1109
+#: ../cli.py:1225
 msgid "debugging output level"
 msgstr ""
 
-#: ../cli.py:1113
+#: ../cli.py:1229
 msgid "show duplicates, in repos, in list/search commands"
 msgstr ""
 
-#: ../cli.py:1115
+#: ../cli.py:1231
 msgid "error output level"
 msgstr ""
 
-#: ../cli.py:1118
+#: ../cli.py:1234
 msgid "quiet operation"
 msgstr ""
 
-#: ../cli.py:1122
+#: ../cli.py:1236
+msgid "verbose operation"
+msgstr ""
+
+#: ../cli.py:1238
 msgid "answer yes for all questions"
 msgstr ""
 
-#: ../cli.py:1124
+#: ../cli.py:1240
 msgid "show Yum version and exit"
 msgstr ""
 
-#: ../cli.py:1125
+#: ../cli.py:1241
 msgid "set install root"
 msgstr ""
 
-#: ../cli.py:1129
+#: ../cli.py:1245
 msgid "enable one or more repositories (wildcards allowed)"
 msgstr ""
 
-#: ../cli.py:1133
+#: ../cli.py:1249
 msgid "disable one or more repositories (wildcards allowed)"
 msgstr ""
 
-#: ../cli.py:1136
+#: ../cli.py:1252
 msgid "exclude package(s) by name or glob"
 msgstr ""
 
-#: ../cli.py:1138
+#: ../cli.py:1254
 msgid "disable exclude from main, for a repo or for everything"
 msgstr ""
 
-#: ../cli.py:1141
+#: ../cli.py:1257
 msgid "enable obsoletes processing during updates"
 msgstr ""
 
-#: ../cli.py:1143
+#: ../cli.py:1259
 msgid "disable Yum plugins"
 msgstr ""
 
-#: ../cli.py:1145
+#: ../cli.py:1261
 msgid "disable gpg signature checking"
 msgstr ""
 
-#: ../cli.py:1147
+#: ../cli.py:1263
 msgid "disable plugins by name"
 msgstr ""
 
-#: ../cli.py:1150
+#: ../cli.py:1266
+msgid "enable plugins by name"
+msgstr ""
+
+#: ../cli.py:1269
 msgid "skip packages with depsolving problems"
 msgstr ""
 
-#: ../output.py:229
+#: ../cli.py:1271
+msgid "control whether color is used"
+msgstr ""
+
+#: ../output.py:300
 msgid "Jan"
 msgstr ""
 
-#: ../output.py:229
+#: ../output.py:300
 msgid "Feb"
 msgstr ""
 
-#: ../output.py:229
+#: ../output.py:300
 msgid "Mar"
 msgstr ""
 
-#: ../output.py:229
+#: ../output.py:300
 msgid "Apr"
 msgstr ""
 
-#: ../output.py:229
+#: ../output.py:300
 msgid "May"
 msgstr ""
 
-#: ../output.py:229
+#: ../output.py:300
 msgid "Jun"
 msgstr ""
 
-#: ../output.py:230
+#: ../output.py:301
 msgid "Jul"
 msgstr ""
 
-#: ../output.py:230
+#: ../output.py:301
 msgid "Aug"
 msgstr ""
 
-#: ../output.py:230
+#: ../output.py:301
 msgid "Sep"
 msgstr ""
 
-#: ../output.py:230
+#: ../output.py:301
 msgid "Oct"
 msgstr ""
 
-#: ../output.py:230
+#: ../output.py:301
 msgid "Nov"
 msgstr ""
 
-#: ../output.py:230
+#: ../output.py:301
 msgid "Dec"
 msgstr ""
 
-#: ../output.py:240
+#: ../output.py:311
 msgid "Trying other mirror."
 msgstr ""
 
-#: ../output.py:293
+#: ../output.py:527
 #, python-format
-msgid "Name       : %s"
+msgid "Name       : %s%s%s"
 msgstr ""
 
-#: ../output.py:294
+#: ../output.py:528
 #, python-format
 msgid "Arch       : %s"
 msgstr ""
 
-#: ../output.py:296
+#: ../output.py:530
 #, python-format
 msgid "Epoch      : %s"
 msgstr ""
 
-#: ../output.py:297
+#: ../output.py:531
 #, python-format
 msgid "Version    : %s"
 msgstr ""
 
-#: ../output.py:298
+#: ../output.py:532
 #, python-format
 msgid "Release    : %s"
 msgstr ""
 
-#: ../output.py:299
+#: ../output.py:533
 #, python-format
 msgid "Size       : %s"
 msgstr ""
 
-#: ../output.py:300
+#: ../output.py:534
 #, python-format
 msgid "Repo       : %s"
 msgstr ""
 
-#: ../output.py:302
+#: ../output.py:536
 #, python-format
 msgid "Committer  : %s"
 msgstr ""
 
-#: ../output.py:303
+#: ../output.py:537
+#, python-format
+msgid "Committime : %s"
+msgstr ""
+
+#: ../output.py:538
+#, python-format
+msgid "Buildtime  : %s"
+msgstr ""
+
+#: ../output.py:540
+#, python-format
+msgid "Installtime: %s"
+msgstr ""
+
+#: ../output.py:541
 msgid "Summary    : "
 msgstr ""
 
-#: ../output.py:305
+#: ../output.py:543
 #, python-format
 msgid "URL        : %s"
 msgstr ""
 
-#: ../output.py:306
+#: ../output.py:544
 #, python-format
 msgid "License    : %s"
 msgstr ""
 
-#: ../output.py:307
+#: ../output.py:545
 msgid "Description: "
 msgstr ""
 
-#: ../output.py:351
-# REMEMBER to Translate [Y/N] to the current locale
-msgid "Is this ok [y/N]: "
+#: ../output.py:609
+msgid "y"
 msgstr ""
 
-#: ../output.py:357 ../output.py:360
-msgid "y"
+#: ../output.py:609
+msgid "yes"
 msgstr ""
 
-#: ../output.py:357
+#: ../output.py:610
 msgid "n"
 msgstr ""
 
-#: ../output.py:357 ../output.py:360
-msgid "yes"
+#: ../output.py:610
+msgid "no"
 msgstr ""
 
-#: ../output.py:357
-msgid "no"
+#: ../output.py:614
+msgid "Is this ok [y/N]: "
 msgstr ""
 
-#: ../output.py:367
+#: ../output.py:702
 #, python-format
 msgid ""
 "\n"
 "Group: %s"
 msgstr ""
 
-#: ../output.py:369
+#: ../output.py:709
 #, python-format
 msgid " Description: %s"
 msgstr ""
 
-#: ../output.py:371
+#: ../output.py:711
 msgid " Mandatory Packages:"
 msgstr ""
 
-#: ../output.py:376
+#: ../output.py:712
 msgid " Default Packages:"
 msgstr ""
 
-#: ../output.py:381
+#: ../output.py:713
 msgid " Optional Packages:"
 msgstr ""
 
-#: ../output.py:386
+#: ../output.py:714
 msgid " Conditional Packages:"
 msgstr ""
 
-#: ../output.py:394
+#: ../output.py:734
 #, python-format
 msgid "package: %s"
 msgstr ""
 
-#: ../output.py:396
+#: ../output.py:736
 msgid "  No dependencies for this package"
 msgstr ""
 
-#: ../output.py:401
+#: ../output.py:741
 #, python-format
 msgid "  dependency: %s"
 msgstr ""
 
-#: ../output.py:403
+#: ../output.py:743
 msgid "   Unsatisfied dependency"
 msgstr ""
 
-#: ../output.py:461
+#: ../output.py:815
+#, python-format
+msgid "Repo        : %s"
+msgstr ""
+
+#: ../output.py:816
 msgid "Matched from:"
 msgstr ""
 
-#: ../output.py:487
-msgid "There was an error calculating total download size"
+#: ../output.py:824
+msgid "Description : "
 msgstr ""
 
-#: ../output.py:492
+#: ../output.py:827
 #, python-format
-msgid "Total size: %s"
+msgid "URL         : %s"
 msgstr ""
 
-#: ../output.py:495
+#: ../output.py:830
 #, python-format
-msgid "Total download size: %s"
+msgid "License     : %s"
 msgstr ""
 
-#: ../output.py:507
-msgid "Package"
+#: ../output.py:833
+#, python-format
+msgid "Filename    : %s"
 msgstr ""
 
-#: ../output.py:507
-msgid "Arch"
+#: ../output.py:837
+msgid "Other       : "
 msgstr ""
 
-#: ../output.py:507
-msgid "Version"
+#: ../output.py:870
+msgid "There was an error calculating total download size"
 msgstr ""
 
-#: ../output.py:507
-msgid "Repository"
+#: ../output.py:875
+#, python-format
+msgid "Total size: %s"
 msgstr ""
 
-#: ../output.py:507
-msgid "Size"
+#: ../output.py:878
+#, python-format
+msgid "Total download size: %s"
 msgstr ""
 
-#: ../output.py:514
+#: ../output.py:913
 msgid "Installing for dependencies"
 msgstr ""
 
-#: ../output.py:515
+#: ../output.py:914
 msgid "Updating for dependencies"
 msgstr ""
 
-#: ../output.py:516
+#: ../output.py:915
 msgid "Removing for dependencies"
 msgstr ""
 
-#: ../output.py:528
+#: ../output.py:922 ../output.py:1018
+msgid "Skipped (dependency problems)"
+msgstr ""
+
+#: ../output.py:943
+msgid "Package"
+msgstr ""
+
+#: ../output.py:943
+msgid "Arch"
+msgstr ""
+
+#: ../output.py:944
+msgid "Version"
+msgstr ""
+
+#: ../output.py:944
+msgid "Repository"
+msgstr ""
+
+#: ../output.py:945
+msgid "Size"
+msgstr ""
+
+#: ../output.py:956
 #, python-format
 msgid ""
 "     replacing  %s.%s %s\n"
 "\n"
 msgstr ""
 
-#: ../output.py:536
+#: ../output.py:964
 #, python-format
 msgid ""
 "\n"
 "Transaction Summary\n"
-"=============================================================================\n"
+"%s\n"
 "Install  %5.5s Package(s)         \n"
 "Update   %5.5s Package(s)         \n"
 "Remove   %5.5s Package(s)         \n"
 msgstr ""
 
-#: ../output.py:554
+#: ../output.py:1012
 msgid "Removed"
 msgstr ""
 
-#: ../output.py:555
+#: ../output.py:1013
 msgid "Dependency Removed"
 msgstr ""
 
-#: ../output.py:557
+#: ../output.py:1015
 msgid "Dependency Installed"
 msgstr ""
 
-#: ../output.py:559
+#: ../output.py:1017
 msgid "Dependency Updated"
 msgstr ""
 
-#: ../output.py:560
+#: ../output.py:1019
 msgid "Replaced"
 msgstr ""
 
-#: ../output.py:618
+#: ../output.py:1092
 #, python-format
 msgid ""
 "\n"
@@ -678,72 +774,76 @@ msgid ""
 "seconds to exit.\n"
 msgstr ""
 
-#: ../output.py:628
+#: ../output.py:1102
 msgid "user interrupt"
 msgstr ""
 
-#: ../output.py:639
+#: ../output.py:1118
+msgid "Total"
+msgstr ""
+
+#: ../output.py:1132
 msgid "installed"
 msgstr ""
 
-#: ../output.py:640
+#: ../output.py:1133
 msgid "updated"
 msgstr ""
 
-#: ../output.py:641
+#: ../output.py:1134
 msgid "obsoleted"
 msgstr ""
 
-#: ../output.py:642
+#: ../output.py:1135
 msgid "erased"
 msgstr ""
 
-#: ../output.py:646
+#: ../output.py:1139
 #, python-format
 msgid "---> Package %s.%s %s:%s-%s set to be %s"
 msgstr ""
 
-#: ../output.py:653
+#: ../output.py:1146
 msgid "--> Running transaction check"
 msgstr ""
 
-#: ../output.py:658
+#: ../output.py:1151
 msgid "--> Restarting Dependency Resolution with new changes."
 msgstr ""
 
-#: ../output.py:663
+#: ../output.py:1156
 msgid "--> Finished Dependency Resolution"
 msgstr ""
 
-#: ../output.py:668
+#: ../output.py:1161
 #, python-format
 msgid "--> Processing Dependency: %s for package: %s"
 msgstr ""
 
-#: ../output.py:673
+#: ../output.py:1166
 #, python-format
 msgid "--> Unresolved Dependency: %s"
 msgstr ""
 
-#: ../output.py:679
+#: ../output.py:1172
 #, python-format
 msgid "--> Processing Conflict: %s conflicts %s"
 msgstr ""
 
-#: ../output.py:682
+#: ../output.py:1175
 msgid "--> Populating transaction set with selected packages. Please wait."
 msgstr ""
 
-#: ../output.py:686
+#: ../output.py:1179
 #, python-format
 msgid "---> Downloading header for %s to pack into transaction set."
 msgstr ""
 
-#: ../yumcommands.py:36
+#: ../yumcommands.py:41
 msgid "You need to be root to perform this command."
 msgstr ""
 
-#: ../yumcommands.py:43
+#: ../yumcommands.py:48
 msgid ""
 "\n"
 "You have enabled checking of packages via GPG keys. This is a good thing. \n"
@@ -761,267 +861,325 @@ msgid ""
 "For more information contact your distribution or package provider.\n"
 msgstr ""
 
-#: ../yumcommands.py:63
+#: ../yumcommands.py:68
 #, python-format
 msgid "Error: Need to pass a list of pkgs to %s"
 msgstr ""
 
-#: ../yumcommands.py:69
+#: ../yumcommands.py:74
 msgid "Error: Need an item to match"
 msgstr ""
 
-#: ../yumcommands.py:75
+#: ../yumcommands.py:80
 msgid "Error: Need a group or list of groups"
 msgstr ""
 
-#: ../yumcommands.py:84
+#: ../yumcommands.py:89
 #, python-format
 msgid "Error: clean requires an option: %s"
 msgstr ""
 
-#: ../yumcommands.py:89
+#: ../yumcommands.py:94
 #, python-format
 msgid "Error: invalid clean argument: %r"
 msgstr ""
 
-#: ../yumcommands.py:102
+#: ../yumcommands.py:107
 msgid "No argument to shell"
 msgstr ""
 
-#: ../yumcommands.py:105
+#: ../yumcommands.py:110
 #, python-format
 msgid "Filename passed to shell: %s"
 msgstr ""
 
-#: ../yumcommands.py:109
+#: ../yumcommands.py:114
 #, python-format
 msgid "File %s given as argument to shell does not exist."
 msgstr ""
 
-#: ../yumcommands.py:115
+#: ../yumcommands.py:120
 msgid "Error: more than one file given as argument to shell."
 msgstr ""
 
-#: ../yumcommands.py:156
+#: ../yumcommands.py:161
 msgid "PACKAGE..."
 msgstr ""
 
-#: ../yumcommands.py:159
+#: ../yumcommands.py:164
 msgid "Install a package or packages on your system"
 msgstr ""
 
-#: ../yumcommands.py:168
+#: ../yumcommands.py:173
 msgid "Setting up Install Process"
 msgstr ""
 
-#: ../yumcommands.py:179
+#: ../yumcommands.py:184
 msgid "[PACKAGE...]"
 msgstr ""
 
-#: ../yumcommands.py:182
+#: ../yumcommands.py:187
 msgid "Update a package or packages on your system"
 msgstr ""
 
-#: ../yumcommands.py:190
+#: ../yumcommands.py:195
 msgid "Setting up Update Process"
 msgstr ""
 
-#: ../yumcommands.py:204
+#: ../yumcommands.py:237
 msgid "Display details about a package or group of packages"
 msgstr ""
 
-#: ../yumcommands.py:212
+#: ../yumcommands.py:278
 msgid "Installed Packages"
 msgstr ""
 
-#: ../yumcommands.py:213
+#: ../yumcommands.py:285
 msgid "Available Packages"
 msgstr ""
 
-#: ../yumcommands.py:214
+#: ../yumcommands.py:289
 msgid "Extra Packages"
 msgstr ""
 
-#: ../yumcommands.py:215
+#: ../yumcommands.py:291
 msgid "Updated Packages"
 msgstr ""
 
-#: ../yumcommands.py:221 ../yumcommands.py:225
+#: ../yumcommands.py:298 ../yumcommands.py:305 ../yumcommands.py:574
 msgid "Obsoleting Packages"
 msgstr ""
 
-#: ../yumcommands.py:226
+#: ../yumcommands.py:307
 msgid "Recently Added Packages"
 msgstr ""
 
-#: ../yumcommands.py:232
+#: ../yumcommands.py:314
 msgid "No matching Packages to list"
 msgstr ""
 
-#: ../yumcommands.py:246
+#: ../yumcommands.py:328
 msgid "List a package or groups of packages"
 msgstr ""
 
-#: ../yumcommands.py:258
+#: ../yumcommands.py:340
 msgid "Remove a package or packages from your system"
 msgstr ""
 
-#: ../yumcommands.py:266
+#: ../yumcommands.py:348
 msgid "Setting up Remove Process"
 msgstr ""
 
-#: ../yumcommands.py:278
+#: ../yumcommands.py:363
 msgid "Setting up Group Process"
 msgstr ""
 
-#: ../yumcommands.py:284
+#: ../yumcommands.py:369
 msgid "No Groups on which to run command"
 msgstr ""
 
-#: ../yumcommands.py:297
+#: ../yumcommands.py:382
 msgid "List available package groups"
 msgstr ""
 
-#: ../yumcommands.py:314
+#: ../yumcommands.py:399
 msgid "Install the packages in a group on your system"
 msgstr ""
 
-#: ../yumcommands.py:336
+#: ../yumcommands.py:421
 msgid "Remove the packages in a group from your system"
 msgstr ""
 
-#: ../yumcommands.py:360
+#: ../yumcommands.py:448
 msgid "Display details about a package group"
 msgstr ""
 
-#: ../yumcommands.py:384
+#: ../yumcommands.py:472
 msgid "Generate the metadata cache"
 msgstr ""
 
-#: ../yumcommands.py:390
+#: ../yumcommands.py:478
 msgid "Making cache files for all metadata files."
 msgstr ""
 
-#: ../yumcommands.py:391
+#: ../yumcommands.py:479
 msgid "This may take a while depending on the speed of this computer"
 msgstr ""
 
-#: ../yumcommands.py:412
+#: ../yumcommands.py:500
 msgid "Metadata Cache Created"
 msgstr ""
 
-#: ../yumcommands.py:426
+#: ../yumcommands.py:514
 msgid "Remove cached data"
 msgstr ""
 
-#: ../yumcommands.py:447
+#: ../yumcommands.py:535
 msgid "Find what package provides the given value"
 msgstr ""
 
-#: ../yumcommands.py:467
+#: ../yumcommands.py:555
 msgid "Check for available package updates"
 msgstr ""
 
-#: ../yumcommands.py:490
+#: ../yumcommands.py:594
 msgid "Search package details for the given string"
 msgstr ""
 
-#: ../yumcommands.py:496
+#: ../yumcommands.py:600
 msgid "Searching Packages: "
 msgstr ""
 
-#: ../yumcommands.py:513
+#: ../yumcommands.py:617
 msgid "Update packages taking obsoletes into account"
 msgstr ""
 
-#: ../yumcommands.py:522
+#: ../yumcommands.py:626
 msgid "Setting up Upgrade Process"
 msgstr ""
 
-#: ../yumcommands.py:536
+#: ../yumcommands.py:640
 msgid "Install a local RPM"
 msgstr ""
 
-#: ../yumcommands.py:545
+#: ../yumcommands.py:649
 msgid "Setting up Local Package Process"
 msgstr ""
 
-#: ../yumcommands.py:564
+#: ../yumcommands.py:668
 msgid "Determine which package provides the given dependency"
 msgstr ""
 
-#: ../yumcommands.py:567
+#: ../yumcommands.py:671
 msgid "Searching Packages for Dependency:"
 msgstr ""
 
-#: ../yumcommands.py:581
+#: ../yumcommands.py:685
 msgid "Run an interactive yum shell"
 msgstr ""
 
-#: ../yumcommands.py:587
+#: ../yumcommands.py:691
 msgid "Setting up Yum Shell"
 msgstr ""
 
-#: ../yumcommands.py:605
+#: ../yumcommands.py:709
 msgid "List a package's dependencies"
 msgstr ""
 
-#: ../yumcommands.py:611
+#: ../yumcommands.py:715
 msgid "Finding dependencies: "
 msgstr ""
 
-#: ../yumcommands.py:627
+#: ../yumcommands.py:731
 msgid "Display the configured software repositories"
 msgstr ""
 
-#: ../yumcommands.py:645
-msgid "repo id"
+#: ../yumcommands.py:779 ../yumcommands.py:780
+msgid "enabled"
 msgstr ""
 
-#: ../yumcommands.py:645
-msgid "repo name"
+#: ../yumcommands.py:788 ../yumcommands.py:789
+msgid "disabled"
 msgstr ""
 
-#: ../yumcommands.py:645
-msgid "status"
+#: ../yumcommands.py:800
+msgid "Repo-id     : "
 msgstr ""
 
-#: ../yumcommands.py:651
-msgid "enabled"
+#: ../yumcommands.py:801
+msgid "Repo-name   : "
 msgstr ""
 
-#: ../yumcommands.py:654
-msgid "disabled"
+#: ../yumcommands.py:802
+msgid "Repo-status : "
 msgstr ""
 
-#: ../yumcommands.py:671
+#: ../yumcommands.py:804
+msgid "Repo-revision: "
+msgstr ""
+
+#: ../yumcommands.py:808
+msgid "Repo-tags   : "
+msgstr ""
+
+#: ../yumcommands.py:814
+msgid "Repo-distro-tags: "
+msgstr ""
+
+#: ../yumcommands.py:819
+msgid "Repo-updated: "
+msgstr ""
+
+#: ../yumcommands.py:821
+msgid "Repo-pkgs   : "
+msgstr ""
+
+#: ../yumcommands.py:822
+msgid "Repo-size   : "
+msgstr ""
+
+#: ../yumcommands.py:829
+msgid "Repo-baseurl: "
+msgstr ""
+
+#: ../yumcommands.py:833
+msgid "Repo-metalink: "
+msgstr ""
+
+#: ../yumcommands.py:836
+msgid "Repo-mirrors: "
+msgstr ""
+
+#: ../yumcommands.py:840
+msgid "Repo-exclude: "
+msgstr ""
+
+#: ../yumcommands.py:844
+msgid "Repo-include: "
+msgstr ""
+
+#. Work out the first (id) and last (enabled/disalbed/count),
+#. then chop the middle (name)...
+#: ../yumcommands.py:854 ../yumcommands.py:880
+msgid "repo id"
+msgstr ""
+
+#: ../yumcommands.py:868 ../yumcommands.py:869 ../yumcommands.py:883
+msgid "status"
+msgstr ""
+
+#: ../yumcommands.py:881
+msgid "repo name"
+msgstr ""
+
+#: ../yumcommands.py:907
 msgid "Display a helpful usage message"
 msgstr ""
 
-#: ../yumcommands.py:705
+#: ../yumcommands.py:941
 #, python-format
 msgid "No help available for %s"
 msgstr ""
 
-#: ../yumcommands.py:710
+#: ../yumcommands.py:946
 msgid ""
 "\n"
 "\n"
 "aliases: "
 msgstr ""
 
-#: ../yumcommands.py:712
+#: ../yumcommands.py:948
 msgid ""
 "\n"
 "\n"
 "alias: "
 msgstr ""
 
-#: ../yumcommands.py:741
+#: ../yumcommands.py:977
 msgid "Setting up Reinstall Process"
 msgstr ""
 
-#: ../yumcommands.py:755
+#: ../yumcommands.py:991
 msgid "reinstall a package"
 msgstr ""
 
@@ -1039,722 +1197,757 @@ msgid ""
 "Exiting on Broken Pipe"
 msgstr ""
 
-#: ../yummain.py:105
+#: ../yummain.py:98
 msgid ""
 "Another app is currently holding the yum lock; waiting for it to exit..."
 msgstr ""
 
-#: ../yummain.py:132 ../yummain.py:171
+#: ../yummain.py:125 ../yummain.py:164
 #, python-format
 msgid "Error: %s"
 msgstr ""
 
-#: ../yummain.py:142 ../yummain.py:178
+#: ../yummain.py:135 ../yummain.py:171
 #, python-format
 msgid "Unknown Error(s): Exit Code: %d:"
 msgstr ""
 
 #. Depsolve stage
-#: ../yummain.py:149
+#: ../yummain.py:142
 msgid "Resolving Dependencies"
 msgstr ""
 
-#: ../yummain.py:184
+#: ../yummain.py:177
 msgid ""
 "\n"
 "Dependencies Resolved"
 msgstr ""
 
-#: ../yummain.py:198
+#: ../yummain.py:191
 msgid "Complete!"
 msgstr ""
 
-#: ../yummain.py:245
+#: ../yummain.py:238
 msgid ""
 "\n"
 "\n"
 "Exiting on user cancel."
 msgstr ""
 
-#: ../yum/depsolve.py:82
+#: ../yum/depsolve.py:84
 msgid "doTsSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/depsolve.py:95
+#: ../yum/depsolve.py:99
 msgid "Setting up TransactionSets before config class is up"
 msgstr ""
 
-#: ../yum/depsolve.py:136
+#: ../yum/depsolve.py:150
 #, python-format
 msgid "Invalid tsflag in config file: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:147
+#: ../yum/depsolve.py:161
 #, python-format
 msgid "Searching pkgSack for dep: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:170
+#: ../yum/depsolve.py:184
 #, python-format
 msgid "Potential match for %s from %s"
 msgstr ""
 
-#: ../yum/depsolve.py:178
+#: ../yum/depsolve.py:192
 #, python-format
 msgid "Matched %s to require for %s"
 msgstr ""
 
-#: ../yum/depsolve.py:219
+#: ../yum/depsolve.py:233
 #, python-format
 msgid "Member: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:233 ../yum/depsolve.py:696
+#: ../yum/depsolve.py:247 ../yum/depsolve.py:737
 #, python-format
 msgid "%s converted to install"
 msgstr ""
 
-#: ../yum/depsolve.py:240
+#: ../yum/depsolve.py:254
 #, python-format
 msgid "Adding Package %s in mode %s"
 msgstr ""
 
-#: ../yum/depsolve.py:250
+#: ../yum/depsolve.py:264
 #, python-format
 msgid "Removing Package %s"
 msgstr ""
 
-#: ../yum/depsolve.py:261
+#: ../yum/depsolve.py:275
 #, python-format
 msgid "%s requires: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:312
+#: ../yum/depsolve.py:333
 msgid "Needed Require has already been looked up, cheating"
 msgstr ""
 
-#: ../yum/depsolve.py:322
+#: ../yum/depsolve.py:343
 #, python-format
 msgid "Needed Require is not a package name. Looking up: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:329
+#: ../yum/depsolve.py:350
 #, python-format
 msgid "Potential Provider: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:352
+#: ../yum/depsolve.py:373
 #, python-format
 msgid "Mode is %s for provider of %s: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:356
+#: ../yum/depsolve.py:377
 #, python-format
 msgid "Mode for pkg providing %s: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:360
+#: ../yum/depsolve.py:381
 #, python-format
 msgid "TSINFO: %s package requiring %s marked as erase"
 msgstr ""
 
-#: ../yum/depsolve.py:372
+#: ../yum/depsolve.py:394
 #, python-format
 msgid "TSINFO: Obsoleting %s with %s to resolve dep."
 msgstr ""
 
-#: ../yum/depsolve.py:375
+#: ../yum/depsolve.py:397
 #, python-format
 msgid "TSINFO: Updating %s to resolve dep."
 msgstr ""
 
-#: ../yum/depsolve.py:378
+#: ../yum/depsolve.py:405
 #, python-format
 msgid "Cannot find an update path for dep for: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:388
+#: ../yum/depsolve.py:415
 #, python-format
 msgid "Unresolvable requirement %s for %s"
 msgstr ""
 
+#: ../yum/depsolve.py:438
+#, python-format
+msgid "Quick matched %s to require for %s"
+msgstr ""
+
 #. is it already installed?
-#: ../yum/depsolve.py:434
+#: ../yum/depsolve.py:480
 #, python-format
 msgid "%s is in providing packages but it is already installed, removing."
 msgstr ""
 
-#: ../yum/depsolve.py:449
+#: ../yum/depsolve.py:495
 #, python-format
 msgid "Potential resolving package %s has newer instance in ts."
 msgstr ""
 
-#: ../yum/depsolve.py:460
+#: ../yum/depsolve.py:506
 #, python-format
 msgid "Potential resolving package %s has newer instance installed."
 msgstr ""
 
-#: ../yum/depsolve.py:468 ../yum/depsolve.py:527
+#: ../yum/depsolve.py:514 ../yum/depsolve.py:563
 #, python-format
 msgid "Missing Dependency: %s is needed by package %s"
 msgstr ""
 
-#: ../yum/depsolve.py:481
+#: ../yum/depsolve.py:527
 #, python-format
 msgid "%s already in ts, skipping this one"
 msgstr ""
 
-#: ../yum/depsolve.py:510
-#, python-format
-msgid ""
-"Failure finding best provider of %s for %s, exceeded maximum loop length"
-msgstr ""
-
-#: ../yum/depsolve.py:537
+#: ../yum/depsolve.py:573
 #, python-format
 msgid "TSINFO: Marking %s as update for %s"
 msgstr ""
 
-#: ../yum/depsolve.py:544
+#: ../yum/depsolve.py:581
 #, python-format
 msgid "TSINFO: Marking %s as install for %s"
 msgstr ""
 
-#: ../yum/depsolve.py:635 ../yum/depsolve.py:714
+#: ../yum/depsolve.py:674 ../yum/depsolve.py:755
 msgid "Success - empty transaction"
 msgstr ""
 
-#: ../yum/depsolve.py:673 ../yum/depsolve.py:686
+#: ../yum/depsolve.py:712 ../yum/depsolve.py:727
 msgid "Restarting Loop"
 msgstr ""
 
-#: ../yum/depsolve.py:702
+#: ../yum/depsolve.py:743
 msgid "Dependency Process ending"
 msgstr ""
 
-#: ../yum/depsolve.py:708
+#: ../yum/depsolve.py:749
 #, python-format
 msgid "%s from %s has depsolving problems"
 msgstr ""
 
-#: ../yum/depsolve.py:715
+#: ../yum/depsolve.py:756
 msgid "Success - deps resolved"
 msgstr ""
 
-#: ../yum/depsolve.py:729
+#: ../yum/depsolve.py:770
 #, python-format
 msgid "Checking deps for %s"
 msgstr ""
 
-#: ../yum/depsolve.py:782
+#: ../yum/depsolve.py:853
 #, python-format
 msgid "looking for %s as a requirement of %s"
 msgstr ""
 
-#: ../yum/depsolve.py:933
-#, python-format
-msgid "Comparing best: %s to po: %s"
-msgstr ""
-
-#: ../yum/depsolve.py:937
-#, python-format
-msgid "Same: best %s == po: %s"
-msgstr ""
-
-#: ../yum/depsolve.py:952 ../yum/depsolve.py:963
-#, python-format
-msgid "best %s obsoletes po: %s"
-msgstr ""
-
-#: ../yum/depsolve.py:955
+#: ../yum/depsolve.py:995
 #, python-format
-msgid "po %s obsoletes best: %s"
+msgid "Running compare_providers() for %s"
 msgstr ""
 
-#: ../yum/depsolve.py:972 ../yum/depsolve.py:979 ../yum/depsolve.py:1036
+#: ../yum/depsolve.py:1023 ../yum/depsolve.py:1029
 #, python-format
 msgid "better arch in po %s"
 msgstr ""
 
-#: ../yum/depsolve.py:988 ../yum/depsolve.py:1010
+#: ../yum/depsolve.py:1083
 #, python-format
-msgid "po %s shares a sourcerpm with %s"
+msgid "%s obsoletes %s"
 msgstr ""
 
-#: ../yum/depsolve.py:992 ../yum/depsolve.py:1015
+#: ../yum/depsolve.py:1099
 #, python-format
-msgid "best %s shares a sourcerpm with %s"
+msgid ""
+"archdist compared %s to %s on %s\n"
+"  Winner: %s"
 msgstr ""
 
-#: ../yum/depsolve.py:999 ../yum/depsolve.py:1020
+#: ../yum/depsolve.py:1106
 #, python-format
-msgid "po %s shares more of the name prefix with %s"
+msgid "common sourcerpm %s and %s"
 msgstr ""
 
-#: ../yum/depsolve.py:1003 ../yum/depsolve.py:1029
+#: ../yum/depsolve.py:1112
 #, python-format
-msgid "po %s has a shorter name than best %s"
+msgid "common prefix of %s between %s and %s"
 msgstr ""
 
-#: ../yum/depsolve.py:1025
+#: ../yum/depsolve.py:1120
 #, python-format
-msgid "bestpkg %s shares more of the name prefix with %s"
+msgid "Best Order: %s"
 msgstr ""
 
-#: ../yum/__init__.py:119
+#: ../yum/__init__.py:154
 msgid "doConfigSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/__init__.py:296
+#. FIXME: Use critical? or exception?
+#: ../yum/__init__.py:335
 #, python-format
 msgid "Repository %r is missing name in configuration, using id"
 msgstr ""
 
-#: ../yum/__init__.py:332
+#: ../yum/__init__.py:373
 msgid "plugins already initialised"
 msgstr ""
 
-#: ../yum/__init__.py:339
+#: ../yum/__init__.py:380
 msgid "doRpmDBSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/__init__.py:349
+#: ../yum/__init__.py:390
 msgid "Reading Local RPMDB"
 msgstr ""
 
-#: ../yum/__init__.py:367
+#: ../yum/__init__.py:408
 msgid "doRepoSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/__init__.py:387
+#: ../yum/__init__.py:428
 msgid "doSackSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/__init__.py:404
+#: ../yum/__init__.py:445
 msgid "Setting up Package Sacks"
 msgstr ""
 
-#: ../yum/__init__.py:447
+#: ../yum/__init__.py:488
 #, python-format
 msgid "repo object for repo %s lacks a _resetSack method\n"
 msgstr ""
 
-#: ../yum/__init__.py:448
+#: ../yum/__init__.py:489
 msgid "therefore this repo cannot be reset.\n"
 msgstr ""
 
-#: ../yum/__init__.py:453
+#: ../yum/__init__.py:494
 msgid "doUpdateSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/__init__.py:465
+#: ../yum/__init__.py:506
 msgid "Building updates object"
 msgstr ""
 
-#: ../yum/__init__.py:496
+#: ../yum/__init__.py:537
 msgid "doGroupSetup() will go away in a future version of Yum.\n"
 msgstr ""
 
-#: ../yum/__init__.py:520
+#: ../yum/__init__.py:561
 msgid "Getting group metadata"
 msgstr ""
 
-#: ../yum/__init__.py:546
+#: ../yum/__init__.py:586
 #, python-format
 msgid "Adding group file from repository: %s"
 msgstr ""
 
-#: ../yum/__init__.py:555
+#: ../yum/__init__.py:591
 #, python-format
 msgid "Failed to add groups file for repository: %s - %s"
 msgstr ""
 
-#: ../yum/__init__.py:561
+#: ../yum/__init__.py:597
 msgid "No Groups Available in any repository"
 msgstr ""
 
-#: ../yum/__init__.py:611
+#: ../yum/__init__.py:647
 msgid "Importing additional filelist information"
 msgstr ""
 
-#: ../yum/__init__.py:657
+#: ../yum/__init__.py:655
+msgid ""
+"There are unfinished transactions remaining. You might consider running yum-"
+"complete-transaction first to finish them."
+msgstr ""
+
+#: ../yum/__init__.py:721
 #, python-format
 msgid "Skip-broken round %i"
 msgstr ""
 
-#: ../yum/__init__.py:680
+#: ../yum/__init__.py:773
 #, python-format
 msgid "Skip-broken took %i rounds "
 msgstr ""
 
-#: ../yum/__init__.py:681
+#: ../yum/__init__.py:774
 msgid ""
 "\n"
 "Packages skipped because of dependency problems:"
 msgstr ""
 
-#: ../yum/__init__.py:685
+#: ../yum/__init__.py:778
 #, python-format
 msgid "    %s from %s"
 msgstr ""
 
-#: ../yum/__init__.py:774
+#: ../yum/__init__.py:921
+msgid ""
+"Warning: scriptlet or other non-fatal errors occurred during transaction."
+msgstr ""
+
+#: ../yum/__init__.py:937
 #, python-format
 msgid "Failed to remove transaction file %s"
 msgstr ""
 
-#: ../yum/__init__.py:814
+#: ../yum/__init__.py:978
 #, python-format
 msgid "excluding for cost: %s from %s"
 msgstr ""
 
-#: ../yum/__init__.py:845
+#: ../yum/__init__.py:1009
 msgid "Excluding Packages in global exclude list"
 msgstr ""
 
-#: ../yum/__init__.py:847
+#: ../yum/__init__.py:1011
 #, python-format
 msgid "Excluding Packages from %s"
 msgstr ""
 
-#: ../yum/__init__.py:875
+#: ../yum/__init__.py:1036
 #, python-format
 msgid "Reducing %s to included packages only"
 msgstr ""
 
-#: ../yum/__init__.py:880
+#: ../yum/__init__.py:1042
 #, python-format
 msgid "Keeping included package %s"
 msgstr ""
 
-#: ../yum/__init__.py:886
+#: ../yum/__init__.py:1048
 #, python-format
 msgid "Removing unmatched package %s"
 msgstr ""
 
-#: ../yum/__init__.py:889
+#: ../yum/__init__.py:1051
 msgid "Finished"
 msgstr ""
 
 #. Whoa. What the heck happened?
-#: ../yum/__init__.py:919
+#: ../yum/__init__.py:1081
 #, python-format
 msgid "Unable to check if PID %s is active"
 msgstr ""
 
 #. Another copy seems to be running.
-#: ../yum/__init__.py:923
+#: ../yum/__init__.py:1085
 #, python-format
 msgid "Existing lock %s: another copy is running as pid %s."
 msgstr ""
 
-#: ../yum/__init__.py:970 ../yum/__init__.py:977
+#: ../yum/__init__.py:1156
 msgid "Package does not match intended download"
 msgstr ""
 
-#: ../yum/__init__.py:991
+#: ../yum/__init__.py:1171
 msgid "Could not perform checksum"
 msgstr ""
 
-#: ../yum/__init__.py:994
+#: ../yum/__init__.py:1174
 msgid "Package does not match checksum"
 msgstr ""
 
-#: ../yum/__init__.py:1036
+#: ../yum/__init__.py:1217
 #, python-format
 msgid "package fails checksum but caching is enabled for %s"
 msgstr ""
 
-#: ../yum/__init__.py:1042
+#: ../yum/__init__.py:1220 ../yum/__init__.py:1248
 #, python-format
 msgid "using local copy of %s"
 msgstr ""
 
-#: ../yum/__init__.py:1061
+#: ../yum/__init__.py:1262
 #, python-format
-msgid "Insufficient space in download directory %s to download"
+msgid ""
+"Insufficient space in download directory %s\n"
+"    * free   %s\n"
+"    * needed %s"
 msgstr ""
 
-#: ../yum/__init__.py:1094
+#: ../yum/__init__.py:1309
 msgid "Header is not complete."
 msgstr ""
 
-#: ../yum/__init__.py:1134
+#: ../yum/__init__.py:1349
 #, python-format
 msgid ""
 "Header not in local cache and caching-only mode enabled. Cannot download %s"
 msgstr ""
 
-#: ../yum/__init__.py:1189
+#: ../yum/__init__.py:1404
 #, python-format
 msgid "Public key for %s is not installed"
 msgstr ""
 
-#: ../yum/__init__.py:1193
+#: ../yum/__init__.py:1408
 #, python-format
 msgid "Problem opening package %s"
 msgstr ""
 
-#: ../yum/__init__.py:1201
+#: ../yum/__init__.py:1416
 #, python-format
 msgid "Public key for %s is not trusted"
 msgstr ""
 
-#: ../yum/__init__.py:1205
+#: ../yum/__init__.py:1420
 #, python-format
 msgid "Package %s is not signed"
 msgstr ""
 
-#: ../yum/__init__.py:1243
+#: ../yum/__init__.py:1458
 #, python-format
 msgid "Cannot remove %s"
 msgstr ""
 
-#: ../yum/__init__.py:1247
+#: ../yum/__init__.py:1461
 #, python-format
 msgid "%s removed"
 msgstr ""
 
-#: ../yum/__init__.py:1283
+#: ../yum/__init__.py:1498
 #, python-format
 msgid "Cannot remove %s file %s"
 msgstr ""
 
-#: ../yum/__init__.py:1287
+#: ../yum/__init__.py:1501
 #, python-format
 msgid "%s file %s removed"
 msgstr ""
 
-#: ../yum/__init__.py:1289
+#: ../yum/__init__.py:1503
 #, python-format
 msgid "%d %s files removed"
 msgstr ""
 
-#: ../yum/__init__.py:1329
+#: ../yum/__init__.py:1571
 #, python-format
 msgid "More than one identical match in sack for %s"
 msgstr ""
 
-#: ../yum/__init__.py:1335
+#: ../yum/__init__.py:1576
 #, python-format
 msgid "Nothing matches %s.%s %s:%s-%s from update"
 msgstr ""
 
-#: ../yum/__init__.py:1543
+#: ../yum/__init__.py:1795
 msgid ""
 "searchPackages() will go away in a future version of "
 "Yum.                      Use searchGenerator() instead. \n"
 msgstr ""
 
-#: ../yum/__init__.py:1580
+#: ../yum/__init__.py:1832
 #, python-format
 msgid "Searching %d packages"
 msgstr ""
 
-#: ../yum/__init__.py:1584
+#: ../yum/__init__.py:1835
 #, python-format
 msgid "searching package %s"
 msgstr ""
 
-#: ../yum/__init__.py:1596
+#: ../yum/__init__.py:1846
 msgid "searching in file entries"
 msgstr ""
 
-#: ../yum/__init__.py:1603
+#: ../yum/__init__.py:1852
 msgid "searching in provides entries"
 msgstr ""
 
-#: ../yum/__init__.py:1633
+#: ../yum/__init__.py:1885
 #, python-format
 msgid "Provides-match: %s"
 msgstr ""
 
-#: ../yum/__init__.py:1702 ../yum/__init__.py:1720 ../yum/__init__.py:1748
-#: ../yum/__init__.py:1753 ../yum/__init__.py:1808 ../yum/__init__.py:1812
+#: ../yum/__init__.py:1934
+msgid "No group data available for configured repositories"
+msgstr ""
+
+#: ../yum/__init__.py:1965 ../yum/__init__.py:1984 ../yum/__init__.py:2014
+#: ../yum/__init__.py:2020 ../yum/__init__.py:2093 ../yum/__init__.py:2097
 #, python-format
 msgid "No Group named %s exists"
 msgstr ""
 
-#: ../yum/__init__.py:1731 ../yum/__init__.py:1824
+#: ../yum/__init__.py:1995 ../yum/__init__.py:2109
 #, python-format
 msgid "package %s was not marked in group %s"
 msgstr ""
 
-#: ../yum/__init__.py:1770
+#: ../yum/__init__.py:2041
 #, python-format
 msgid "Adding package %s from group %s"
 msgstr ""
 
-#: ../yum/__init__.py:1774
+#: ../yum/__init__.py:2046
 #, python-format
 msgid "No package named %s available to be installed"
 msgstr ""
 
-#: ../yum/__init__.py:1849
+#: ../yum/__init__.py:2134
 #, python-format
 msgid "Package tuple %s could not be found in packagesack"
 msgstr ""
 
-#: ../yum/__init__.py:1917 ../yum/__init__.py:1960
+#: ../yum/__init__.py:2149
+msgid ""
+"getInstalledPackageObject() will go away, use self.rpmdb.searchPkgTuple().\n"
+msgstr ""
+
+#: ../yum/__init__.py:2201 ../yum/__init__.py:2244
 msgid "Invalid versioned dependency string, try quoting it."
 msgstr ""
 
-#: ../yum/__init__.py:1919 ../yum/__init__.py:1962
+#: ../yum/__init__.py:2203 ../yum/__init__.py:2246
 msgid "Invalid version flag"
 msgstr ""
 
-#: ../yum/__init__.py:1934 ../yum/__init__.py:1938
+#: ../yum/__init__.py:2218 ../yum/__init__.py:2222
 #, python-format
 msgid "No Package found for %s"
 msgstr ""
 
-#: ../yum/__init__.py:2066
+#: ../yum/__init__.py:2429
 msgid "Package Object was not a package object instance"
 msgstr ""
 
-#: ../yum/__init__.py:2070
+#: ../yum/__init__.py:2433
 msgid "Nothing specified to install"
 msgstr ""
 
 #. only one in there
-#: ../yum/__init__.py:2085
+#: ../yum/__init__.py:2451
 #, python-format
 msgid "Checking for virtual provide or file-provide for %s"
 msgstr ""
 
-#: ../yum/__init__.py:2091 ../yum/__init__.py:2380
+#: ../yum/__init__.py:2457 ../yum/__init__.py:2706 ../yum/__init__.py:2872
 #, python-format
 msgid "No Match for argument: %s"
 msgstr ""
 
-#. FIXME - this is where we could check to see if it already installed
-#. for returning better errors
-#: ../yum/__init__.py:2146
+#: ../yum/__init__.py:2523
+#, python-format
+msgid "Package %s installed and not available"
+msgstr ""
+
+#: ../yum/__init__.py:2526
 msgid "No package(s) available to install"
 msgstr ""
 
-#: ../yum/__init__.py:2158
+#: ../yum/__init__.py:2539
 #, python-format
 msgid "Package: %s  - already in transaction set"
 msgstr ""
 
-#: ../yum/__init__.py:2171
+#: ../yum/__init__.py:2555
+#, python-format
+msgid "Package %s is obsoleted by %s, trying to install %s instead"
+msgstr ""
+
+#: ../yum/__init__.py:2563
 #, python-format
 msgid "Package %s already installed and latest version"
 msgstr ""
 
-#: ../yum/__init__.py:2178
+#: ../yum/__init__.py:2570
 #, python-format
 msgid "Package matching %s already installed. Checking for update."
 msgstr ""
 
 #. update everything (the easy case)
-#: ../yum/__init__.py:2220
+#: ../yum/__init__.py:2650
 msgid "Updating Everything"
 msgstr ""
 
-#: ../yum/__init__.py:2304
+#: ../yum/__init__.py:2668 ../yum/__init__.py:2778 ../yum/__init__.py:2799
+#: ../yum/__init__.py:2821
 #, python-format
-msgid "Package is already obsoleted: %s.%s %s:%s-%s"
+msgid "Not Updating Package that is already obsoleted: %s.%s %s:%s-%s"
 msgstr ""
 
-#: ../yum/__init__.py:2377
+#: ../yum/__init__.py:2703 ../yum/__init__.py:2869
 #, python-format
 msgid "%s"
 msgstr ""
 
-#: ../yum/__init__.py:2392
+#: ../yum/__init__.py:2769
+#, python-format
+msgid "Package is already obsoleted: %s.%s %s:%s-%s"
+msgstr ""
+
+#: ../yum/__init__.py:2802 ../yum/__init__.py:2824
+#, python-format
+msgid "Not Updating Package that is already updated: %s.%s %s:%s-%s"
+msgstr ""
+
+#: ../yum/__init__.py:2885
 msgid "No package matched to remove"
 msgstr ""
 
-#: ../yum/__init__.py:2426
+#: ../yum/__init__.py:2919
 #, python-format
 msgid "Cannot open file: %s. Skipping."
 msgstr ""
 
-#: ../yum/__init__.py:2429
+#: ../yum/__init__.py:2921
 #, python-format
 msgid "Examining %s: %s"
 msgstr ""
 
-#: ../yum/__init__.py:2436
+#: ../yum/__init__.py:2929
+#, python-format
+msgid "Cannot add package %s to transaction. Not a compatible architecture: %s"
+msgstr ""
+
+#: ../yum/__init__.py:2937
 #, python-format
 msgid ""
 "Package %s not installed, cannot update it. Run yum install to install it "
 "instead."
 msgstr ""
 
-#: ../yum/__init__.py:2468
+#: ../yum/__init__.py:2970
 #, python-format
 msgid "Excluding %s"
 msgstr ""
 
-#: ../yum/__init__.py:2473
+#: ../yum/__init__.py:2974
 #, python-format
 msgid "Marking %s to be installed"
 msgstr ""
 
-#: ../yum/__init__.py:2479
+#: ../yum/__init__.py:2979
 #, python-format
 msgid "Marking %s as an update to %s"
 msgstr ""
 
-#: ../yum/__init__.py:2486
+#: ../yum/__init__.py:2984
 #, python-format
 msgid "%s: does not update installed package."
 msgstr ""
 
-#: ../yum/__init__.py:2504
+#: ../yum/__init__.py:3001
 msgid "Problem in reinstall: no package matched to remove"
 msgstr ""
 
-#: ../yum/__init__.py:2515
+#: ../yum/__init__.py:3012
 #, python-format
 msgid "Package %s is allowed multiple installs, skipping"
 msgstr ""
 
-#: ../yum/__init__.py:2522
+#: ../yum/__init__.py:3019
 msgid "Problem in reinstall: no package matched to install"
 msgstr ""
 
-#: ../yum/__init__.py:2570
+#: ../yum/__init__.py:3054
 #, python-format
 msgid "Retrieving GPG key from %s"
 msgstr ""
 
-#: ../yum/__init__.py:2576
+#: ../yum/__init__.py:3074
 msgid "GPG key retrieval failed: "
 msgstr ""
 
-#: ../yum/__init__.py:2589
-msgid "GPG key parsing failed: "
+#: ../yum/__init__.py:3085
+#, python-format
+msgid "GPG key parsing failed: key does not have value %s"
 msgstr ""
 
-#: ../yum/__init__.py:2593
+#: ../yum/__init__.py:3117
 #, python-format
 msgid "GPG key at %s (0x%s) is already installed"
 msgstr ""
 
 #. Try installing/updating GPG key
-#: ../yum/__init__.py:2598
+#: ../yum/__init__.py:3122 ../yum/__init__.py:3183
 #, python-format
 msgid "Importing GPG key 0x%s \"%s\" from %s"
 msgstr ""
 
-#: ../yum/__init__.py:2610
+#: ../yum/__init__.py:3138
 msgid "Not installing key"
 msgstr ""
 
-#: ../yum/__init__.py:2616
+#: ../yum/__init__.py:3144
 #, python-format
 msgid "Key import failed (code %d)"
 msgstr ""
 
-#: ../yum/__init__.py:2619
+#: ../yum/__init__.py:3145 ../yum/__init__.py:3205
 msgid "Key imported successfully"
 msgstr ""
 
-#: ../yum/__init__.py:2624
+#: ../yum/__init__.py:3150 ../yum/__init__.py:3210
 #, python-format
 msgid ""
 "The GPG keys listed for the \"%s\" repository are already installed but they "
@@ -1762,74 +1955,103 @@ msgid ""
 "Check that the correct key URLs are configured for this repository."
 msgstr ""
 
-#: ../yum/__init__.py:2633
+#: ../yum/__init__.py:3159
 msgid "Import of key(s) didn't help, wrong key(s)?"
 msgstr ""
 
-#: ../yum/__init__.py:2707
+#: ../yum/__init__.py:3178
+#, python-format
+msgid "GPG key at %s (0x%s) is already imported"
+msgstr ""
+
+#: ../yum/__init__.py:3197
+#, python-format
+msgid "Not installing key for repo %s"
+msgstr ""
+
+#: ../yum/__init__.py:3204
+msgid "Key import failed"
+msgstr ""
+
+#: ../yum/__init__.py:3294
 msgid "Unable to find a suitable mirror."
 msgstr ""
 
-#: ../yum/__init__.py:2709
+#: ../yum/__init__.py:3296
 msgid "Errors were encountered while downloading packages."
 msgstr ""
 
-#: ../yum/__init__.py:2774
+#: ../yum/__init__.py:3336
+#, python-format
+msgid "Please report this error at %s"
+msgstr ""
+
+#: ../yum/__init__.py:3360
 msgid "Test Transaction Errors: "
 msgstr ""
 
 #. Mostly copied from YumOutput._outKeyValFill()
-#: ../yum/plugins.py:195
+#: ../yum/plugins.py:201
 msgid "Loaded plugins: "
 msgstr ""
 
-#: ../yum/plugins.py:206
+#: ../yum/plugins.py:215 ../yum/plugins.py:221
 #, python-format
 msgid "No plugin match for: %s"
 msgstr ""
 
-#: ../yum/plugins.py:219
+#: ../yum/plugins.py:251
 #, python-format
 msgid "\"%s\" plugin is disabled"
 msgstr ""
 
-#: ../yum/plugins.py:231
+#. Give full backtrace:
+#: ../yum/plugins.py:263
+#, python-format
+msgid "Plugin \"%s\" can't be imported"
+msgstr ""
+
+#: ../yum/plugins.py:270
 #, python-format
 msgid "Plugin \"%s\" doesn't specify required API version"
 msgstr ""
 
-#: ../yum/plugins.py:235
+#: ../yum/plugins.py:275
 #, python-format
 msgid "Plugin \"%s\" requires API %s. Supported API is %s."
 msgstr ""
 
-#: ../yum/plugins.py:264
+#: ../yum/plugins.py:308
 #, python-format
 msgid "Loading \"%s\" plugin"
 msgstr ""
 
-#: ../yum/plugins.py:271
+#: ../yum/plugins.py:315
 #, python-format
 msgid ""
 "Two or more plugins with the name \"%s\" exist in the plugin search path"
 msgstr ""
 
-#: ../yum/plugins.py:291
+#: ../yum/plugins.py:335
 #, python-format
 msgid "Configuration file %s not found"
 msgstr ""
 
 #. for
 #. Configuration files for the plugin not found
-#: ../yum/plugins.py:294
+#: ../yum/plugins.py:338
 #, python-format
 msgid "Unable to find configuration file for plugin %s"
 msgstr ""
 
-#: ../yum/plugins.py:448
+#: ../yum/plugins.py:492
 msgid "registration of commands not supported"
 msgstr ""
 
+#: ../yum/rpmtrans.py:78
+msgid "Repackaging"
+msgstr ""
+
 #: ../rpmUtils/oldUtils.py:26
 #, python-format
 msgid "Header cannot be opened or does not match %s, %s."
diff --git a/yum-updatesd.py b/yum-updatesd.py
index ac05f2b..62af3f1 100644
--- a/yum-updatesd.py
+++ b/yum-updatesd.py
@@ -257,8 +257,7 @@ class UpdateBuildTransactionThread(threading.Thread):
     def __init__(self, updd, name):
         self.updd = updd
         threading.Thread.__init__(self, name=name)
-
-    def run(self):
+    def preRun(self,helpDownloadPkgs):
         self.updd.tsInfo.makelists()
         try:
             (result, msgs) = self.updd.buildTransaction()
@@ -267,11 +266,17 @@ class UpdateBuildTransactionThread(threading.Thread):
             self.updd.emitUpdateFailed(msgs)
             return
 
-        dlpkgs = map(lambda x: x.po, filter(lambda txmbr:
+        self.dlpkgs = map(lambda x: x.po, filter(lambda txmbr:
                                             txmbr.ts_state in ("i", "u"),
                                             self.updd.tsInfo.getMembers()))
-        self.updd.downloadPkgs(dlpkgs)
-        self.processPkgs(dlpkgs)
+        
+        self.updd.downloadPkgs1(dlpkgs,helpDownloadPkgs)
+        return
+    def run(self,helpDownloadPkgs):
+        self.updd.downloadPkgs2(helpDownloadPkgs)
+    def postRun(self):
+        self.updd.downloadPkgs3()
+        self.processPkgs(self.dlpkgs)
 
 
 class UpdateDownloadThread(UpdateBuildTransactionThread):
@@ -332,7 +337,7 @@ class UpdatesDaemon(yum.YumBase):
         yum.YumBase.__init__(self)
         self.opts = opts
         self.didSetup = False
-
+        self.helpDownloadPkgs=HDP()
         self.emitters = []
         if 'dbus' in self.opts.emit_via:
             self.emitters.append(DbusUpdateEmitter())
@@ -479,12 +484,30 @@ class UpdatesDaemon(yum.YumBase):
             self.populateUpdates()
 
             if self.opts.do_update:
+                uit_arr=[]
                 uit = UpdateInstallThread(self)
-                uit.start()
+                uit1 = UpdateInstallThread(self)
+                uit_arr.append(uit)
+                uit_arr.append(uit1)
+                uit.preRun(self.helpDownloadPkgs)
+                uit.start(self.helpDownloadPkgs)
+                uit1.start(self.helpdownloadPkgs)
+                for thr in uit_arr:
+                    thr. join()
+                uit.postRun()
             elif self.opts.do_download:
                 self.emitDownloading()
+                dl_arr=[]
                 dl = UpdateDownloadThread(self)
-                dl.start()
+                dl1 = UpdateDownloadThread(self)
+                dl_arr.append(dl)
+                dl_arr.append(dl1)
+                dl.preRun(self.helpDownloadPkgs)
+                dl.start(self.helpDownloadPkgs)
+                dl1.start(self.helpDownloadPkgs)
+                for thr in dl_arr:
+                    thr.join()
+                dl.postRun()
             else:
                 # just notify about things being available
                 self.emitAvailable()
diff --git a/yum/__init__.py b/yum/__init__.py
index db3bc1f..f7941fd 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -31,7 +31,7 @@ import logging
 import logging.config
 import operator
 import gzip
-
+import threading
 import yum.i18n
 _ = yum.i18n._
 P_ = yum.i18n.P_
@@ -82,7 +82,6 @@ __version_info__ = tuple([ int(num) for num in __version__.split('.')])
 #  Don't do it at init time, or we'll get multiple additions if you create
 # multiple YumBase() objects.
 default_grabber.opts.user_agent += " yum/" + __version__
-
 class _YumPreBaseConf:
     """This is the configuration interface for the YumBase configuration.
        So if you want to change if plugins are on/off, or debuglevel/etc.
@@ -101,14 +100,69 @@ class _YumPreBaseConf:
         self.syslog_ident = None
         self.syslog_facility = None
         self.syslog_device = '/dev/log'
-
-
+class HDP:
+#HDP HelpDownloadPkgs
+    threadLock = threading.Lock()
+    remote_pkgs = []  
+    remote_size = 0
+    errors = {}
+    beg_download = time.time()
+    i = 0
+    local_size = 0
+    pkg_count=0
+    pkg_status=[0]
+    def __init__(self):
+        pass
+    def initStatusArray(self):
+        HDP.pkg_status*=len(HDP.remote_pkgs)
+        return
+    def getPackage2Dwd(self,threadCount,isActive):
+        HDP.threadLock.acquire()
+        try:
+            for pkgpoint in range(len(HDP.remote_pkgs)):
+                if HDP.pkg_status[pkgpoint] is 0:
+                    HDP.pkg_status[pkgpoint]=1
+                    threadCount=pkgpoint
+                    isActive=1
+                    break
+            return (threadCount,isActive)
+        finally:
+            HDP.threadLock.release() 
+    def incrPkgCount(self):
+        HDP.threadLock.acquire()
+        try:
+            HDP.pkg_count+=1
+        finally:
+            HDP.threadLock.release()
+    def incI(self):
+        HDP.threadLock.acquire()
+        try:
+	    HDP.i+=1
+	    return
+        finally:
+            HDP.threadLock.release()
+
+    def getPo(self,threadCount):
+        return HDP.remote_pkgs[threadCount]
+    def decRemote_size(self,p):
+        HDP.threadLock.acquire()
+        try:
+            HDP.remote_size-=p
+	    return
+        finally:
+            HDP.threadLock.release()
+    def incLocal_size(self,val):
+        HDP.threadLock.acquire()
+        try:
+            HDP.local_size += val
+            return
+        finally:
+            HDP.threadLock.release()
 class YumBase(depsolve.Depsolve):
     """This is a primary structure and base class. It houses the objects and
        methods needed to perform most things in yum. It is almost an abstract
        class in that you will need to add your own class above it for most
        real use."""
-    
     def __init__(self):
         depsolve.Depsolve.__init__(self)
         self._conf = None
@@ -1214,8 +1268,9 @@ class YumBase(depsolve.Depsolve):
             raise URLGrabError(-1, _('Package does not match checksum'))
         
         return 0
-
-    def downloadPkgs(self, pkglist, callback=None, callback_total=None):
+    def numberOfPackages(self):
+        return len(HDP.remote_pkgs)
+    def downloadPkgs1(self, pkglist,hDP):
         def mediasort(apo, bpo):
             # FIXME: we should probably also use the mediaid; else we
             # could conceivably ping-pong between different disc1's
@@ -1236,19 +1291,11 @@ class YumBase(depsolve.Depsolve):
         
         """download list of package objects handed to you, output based on
            callback, raise yum.Errors.YumBaseError on problems"""
-
-        errors = {}
-        def adderror(po, msg):
-            errors.setdefault(po, []).append(msg)
-
         self.plugins.run('predownload', pkglist=pkglist)
         repo_cached = False
-        remote_pkgs = []
-        remote_size = 0
         for po in pkglist:
             if hasattr(po, 'pkgtype') and po.pkgtype == 'local':
-                continue
-                    
+                continue                    
             local = po.localPkg()
             if os.path.exists(local):
                 if not self.verifyPkg(local, po, False):
@@ -1260,80 +1307,94 @@ class YumBase(depsolve.Depsolve):
                     self.verbose_logger.debug(_("using local copy of %s") %(po,))
                     continue
                         
-            remote_pkgs.append(po)
-            remote_size += po.size
+            HDP.remote_pkgs.append(po)
+            HDP.remote_size += po.size
             
             # caching is enabled and the package 
             # just failed to check out there's no 
             # way to save this, report the error and return
-            if (self.conf.cache or repo_cached) and errors:
-                return errors
+            if (self.conf.cache or repo_cached) and HDP.errors:
+                return HDP.errors
                 
-
-        remote_pkgs.sort(mediasort)
+        hDP.initStatusArray()
+        HDP.remote_pkgs.sort(mediasort)
         #  This is kind of a hack and does nothing in non-Fedora versions,
         # we'll fix it one way or anther soon.
         if (hasattr(urlgrabber.progress, 'text_meter_total_size') and
-            len(remote_pkgs) > 1):
-            urlgrabber.progress.text_meter_total_size(remote_size)
-        beg_download = time.time()
-        i = 0
-        local_size = 0
-        for po in remote_pkgs:
+            len(HDP.remote_pkgs) > 1):
+            urlgrabber.progress.text_meter_total_size(HDP.remote_size)
+        return
+    def downloadPkgs2(self,hDP):
+        def adderror(po, msg):
+            HDP.errors.setdefault(po, []).append(msg)
+        while HDP.pkg_count < len(HDP.pkg_status):
+            isActive=0
+            threadCount=0
+            (threadCount,isActive) = hDP.getPackage2Dwd(threadCount,isActive)
+            if isActive is 0: # no package to download
+                return
             #  Recheck if the file is there, works around a couple of weird
             # edge cases.
-            local = po.localPkg()
-            i += 1
+            local = hDP.getPo(threadCount).localPkg()
+            hDP.incI()
             if os.path.exists(local):
-                if self.verifyPkg(local, po, False):
-                    self.verbose_logger.debug(_("using local copy of %s") %(po,))
-                    remote_size -= po.size
+                if self.verifyPkg(local, hDP.getPo(threadCount), False):
+                    self.verbose_logger.debug(_("using local copy of %s") %(hDP.getPo(threadCount),))
+                    hDP.decRemote_size(hDP.getPo(threadCount).size)
                     if hasattr(urlgrabber.progress, 'text_meter_total_size'):
-                        urlgrabber.progress.text_meter_total_size(remote_size,
-                                                                  local_size)
+                        urlgrabber.progress.text_meter_total_size(HDP.remote_size,
+                                                                  HDP.local_size)
+                    HDP.pkg_status[threadCount]=2
+                    hDP.incrPkgCount()
                     continue
-                if os.path.getsize(local) >= po.size:
+                if os.path.getsize(local) >= hDP.getPo(threadCount).size:
                     os.unlink(local)
 
-            checkfunc = (self.verifyPkg, (po, 1), {})
-            dirstat = os.statvfs(po.repo.pkgdir)
-            if (dirstat.f_bavail * dirstat.f_bsize) <= long(po.size):
-                adderror(po, _('Insufficient space in download directory %s\n'
+            checkfunc = (self.verifyPkg, (hDP.getPo(threadCount), 1), {})
+            dirstat = os.statvfs(hDP.getPo(threadCount).repo.pkgdir)
+            if (dirstat.f_bavail * dirstat.f_bsize) <= long(hDP.getPo(threadCount).size):
+                adderror(hDP.getPo(threadCount), _('Insufficient space in download directory %s\n'
                         "    * free   %s\n"
                         "    * needed %s") %
-                         (po.repo.pkgdir,
+                         (hDP.getPo(threadCount).repo.pkgdir,
                           format_number(dirstat.f_bavail * dirstat.f_bsize),
-                          format_number(po.size)))
+                          format_number(hDP.getPo(threadCount).size)))
+                "set the value at this particular index in remote_pkgs array to 2 or some erronous state"
+                HDP.pkg_status[threadCount]=2
+                hDP.incrPkgCount() 
                 continue
             
             try:
-                if i == 1 and not local_size and remote_size == po.size:
-                    text = os.path.basename(po.relativepath)
+                if HDP.i == 1 and not HDP.local_size and HDP.remote_size == hDP.getPo(threadCount).size:
+                    text = os.path.basename(hDP.getPo(threadCount).relativepath)
                 else:
-                    text = '(%s/%s): %s' % (i, len(remote_pkgs),
-                                            os.path.basename(po.relativepath))
-                mylocal = po.repo.getPackage(po,
+                    text = '(%s/%s): %s' % (HDP.i, len(HDP.pkg_status),
+                                            os.path.basename(hDP.getPo(threadCount).relativepath))
+                mylocal = hDP.getPo(threadCount).repo.getPackage(hDP.getPo(threadCount),
                                    checkfunc=checkfunc,
                                    text=text,
-                                   cache=po.repo.http_caching != 'none',
+                                   cache=hDP.getPo(threadCount).repo.http_caching != 'none',
                                    )
-                local_size += po.size
+                HDP.pkg_status[threadCount]=2
+                hDP.incrPkgCount()                   
+                hDP.incLocal_size(hDP.getPo(threadCount).size)
                 if hasattr(urlgrabber.progress, 'text_meter_total_size'):
-                    urlgrabber.progress.text_meter_total_size(remote_size,
-                                                              local_size)
+                    urlgrabber.progress.text_meter_total_size(HDP.remote_size,
+                                                              HDP.local_size)
             except Errors.RepoError, e:
-                adderror(po, str(e))
+                adderror(hDP.getPo(threadCount), str(e))
             else:
-                po.localpath = mylocal
-                if errors.has_key(po):
-                    del errors[po]
-
-        if callback_total is not None and not errors:
-            callback_total(remote_pkgs, remote_size, beg_download)
+                hDP.getPo(threadCount).localpath = mylocal
+                if HDP.errors.has_key(hDP.getPo(threadCount)):
+                    del HDP.errors[hDP.getPo(threadCount)]
+        return 
+    def downloadPkgs3(self,callback=None, callback_total=None):
+        if callback_total is not None and not HDP.errors:
+            callback_total(HDP.remote_pkgs, HDP.remote_size, HDP.beg_download)
 
-        self.plugins.run('postdownload', pkglist=pkglist, errors=errors)
+        self.plugins.run('postdownload', pkglist=HDP.remote_pkgs, errors=HDP.errors)
 
-        return errors
+        return HDP.errors
 
     def verifyHeader(self, fo, po, raiseError):
         """check the header out via it's naevr, internally"""


More information about the Yum mailing list