[yum] update to latest HEAD.

James Antill james at fedoraproject.org
Fri Feb 15 19:38:20 UTC 2013


commit 26a60613f1ca14fccfbc5f47de38ad641cf0729c
Author: James Antill <james at and.org>
Date:   Fri Feb 15 14:38:12 2013 -0500

    update to latest HEAD.
    
    - Add load-ts helper.
    - Update downloadonly plugin version obs.

 yum-HEAD.patch |  483 +++++++++++++++++++++++++++++++++++++++++++-------------
 yum.spec       |    9 +-
 2 files changed, 378 insertions(+), 114 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 59127c8..51c7668 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -96,7 +96,7 @@ index 2f6154e..2e5a052 100644
 diff --git a/cli.py b/cli.py
 old mode 100644
 new mode 100755
-index 6056d38..4e57620
+index 6056d38..5f03d35
 --- a/cli.py
 +++ b/cli.py
 @@ -25,7 +25,7 @@ import sys
@@ -246,17 +246,23 @@ index 6056d38..4e57620
              # now set  all the non-first-start opts from main from our setopts
              if self.main_setopts:
                  for opt in self.main_setopts.items:
-@@ -240,6 +272,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -238,10 +270,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+                     setattr(self.conf, opt, getattr(self.main_setopts, opt))
+ 
          except yum.Errors.ConfigError, e:
-             self.logger.critical(_('Config Error: %s'), e)
-             sys.exit(1)
+-            self.logger.critical(_('Config Error: %s'), e)
++            self.logger.critical(_('Config error: %s'), e)
++            sys.exit(1)
 +        except IOError, e:
 +            e = '%s: %s' % (to_unicode(e.args[1]), repr(e.filename))
-+            self.logger.critical(_('Config Error: %s'), e)
-+            sys.exit(1)
++            self.logger.critical(_('Config error: %s'), e)
+             sys.exit(1)
          except ValueError, e:
-             self.logger.critical(_('Options Error: %s'), e)
+-            self.logger.critical(_('Options Error: %s'), e)
++            self.logger.critical(_('Options error: %s'), e)
              sys.exit(1)
+ 
+         # update usage in case plugins have added commands
 @@ -290,9 +326,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
                                     self.term.MODE['normal'])
                  print _("  Installed: %s-%s at %s") %(name, ver,
@@ -269,21 +275,23 @@ index 6056d38..4e57620
                                                      sm_ui_date(pkg.committime))
              sys.exit(0)
  
-@@ -318,9 +354,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -318,10 +354,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
          time.sleep(sleeptime)
          
      def parseCommands(self):
 -        """reads self.cmds and parses them out to make sure that the requested 
 -        base command + argument makes any sense at all""" 
 -
+-        self.verbose_logger.debug('Yum Version: %s', yum.__version__)
 +        """Read :attr:`self.cmds` and parse them out to make sure that
 +        the requested base command and argument makes any sense at
 +        all.  This function will also set :attr:`self.basecmd` and
 +        :attr:`self.extcmds`.
 +        """
-         self.verbose_logger.debug('Yum Version: %s', yum.__version__)
++        self.verbose_logger.debug('Yum version: %s', yum.__version__)
          self.verbose_logger.log(yum.logginglevels.DEBUG_4,
                                  'COMMAND: %s', self.cmdstring)
+         self.verbose_logger.log(yum.logginglevels.DEBUG_4,
 @@ -365,7 +403,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
          self.history.write_addon_data('shell-cmds', data)
  
@@ -317,14 +325,6 @@ index 6056d38..4e57620
  
  
 -    def doCommands(self):
--        """
--        Calls the base command passes the extended commands/args out to be
--        parsed (most notably package globs).
--        
--        Returns a numeric result code and an optional string
--           - 0 = we're done, exit
--           - 1 = we've errored, exit with error string
--           - 2 = we've got work yet to do, onto the next stage
 +    def waitForLock(self):
 +        """Establish the yum lock.  If another process is already
 +        holding the yum lock, by default this method will keep trying
@@ -332,6 +332,14 @@ index 6056d38..4e57620
 +        :attr:`self.conf.exit_on_lock` is set to True, it will
 +        raise a :class:`Errors.YumBaseError`.
          """
+-        Calls the base command passes the extended commands/args out to be
+-        parsed (most notably package globs).
+-        
+-        Returns a numeric result code and an optional string
+-           - 0 = we're done, exit
+-           - 1 = we've errored, exit with error string
+-           - 2 = we've got work yet to do, onto the next stage
+-        """
 -        
 +        lockerr = ""
 +        while True:
@@ -422,7 +430,7 @@ index 6056d38..4e57620
                  stuff_to_download = True
                  po = txmbr.po
                  if po:
-@@ -489,9 +571,20 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -489,19 +571,30 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
          else:
              self.reportDownloadSize(downloadpkgs, install_only)
          
@@ -440,10 +448,75 @@ index 6056d38..4e57620
          # confirm with user
          if self._promptWanted():
 -            if not self.userconfirm():
+-                self.verbose_logger.info(_('Exiting on user Command'))
 +            if self.conf.assumeno or not self.userconfirm():
-                 self.verbose_logger.info(_('Exiting on user Command'))
++                self.verbose_logger.info(_('Exiting on user command'))
                  return -1
  
+         self.verbose_logger.log(yum.logginglevels.INFO_2,
+-            _('Downloading Packages:'))
++            _('Downloading packages:'))
+         problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb) 
+ 
+         if len(problems) > 0:
+             errstring = ''
+-            errstring += _('Error Downloading Packages:\n')
++            errstring += _('Error downloading packages:\n')
+             for key in problems:
+                 errors = yum.misc.unique(problems[key])
+                 for error in errors:
+@@ -520,7 +613,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+ 
+         rcd_st = time.time()
+         self.verbose_logger.log(yum.logginglevels.INFO_2, 
+-             _('Running Transaction Check'))
++             _('Running transaction check'))
+         msgs = self._run_rpm_check()
+         if msgs:
+             rpmlib_only = True
+@@ -540,11 +633,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+                 return 1, [_('RPM needs to be updated')]
+             return 1, [_('Please report this error in %s') % self.conf.bugtracker_url]
+ 
+-        self.verbose_logger.debug('Transaction Check time: %0.3f' % (time.time() - rcd_st))
++        self.verbose_logger.debug('Transaction check time: %0.3f' % (time.time() - rcd_st))
+ 
+         tt_st = time.time()            
+         self.verbose_logger.log(yum.logginglevels.INFO_2,
+-            _('Running Transaction Test'))
++            _('Running transaction test'))
+         if not self.conf.diskspacecheck:
+             self.tsInfo.probFilterFlags.append(rpm.RPMPROB_FILTER_DISKSPACE)
+             
+@@ -556,16 +649,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+         del testcb
+ 
+         if len(tserrors) > 0:
+-            errstring = _('Transaction Check Error:\n')
++            errstring = _('Transaction check error:\n')
+             for descr in tserrors:
+                 errstring += '  %s\n' % to_unicode(descr)
+             
+             raise yum.Errors.YumBaseError, errstring + '\n' + \
+                  self.errorSummary(errstring)
+         self.verbose_logger.log(yum.logginglevels.INFO_2,
+-             _('Transaction Test Succeeded'))
++             _('Transaction test succeeded'))
+         
+-        self.verbose_logger.debug('Transaction Test time: %0.3f' % (time.time() - tt_st))
++        self.verbose_logger.debug('Transaction test time: %0.3f' % (time.time() - tt_st))
+         
+         # unset the sigquit handler
+         signal.signal(signal.SIGQUIT, signal.SIG_DFL)
+@@ -595,7 +688,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+         if self.conf.debuglevel < 2:
+             cb.display.output = False
+ 
+-        self.verbose_logger.log(yum.logginglevels.INFO_2, _('Running Transaction'))
++        self.verbose_logger.log(yum.logginglevels.INFO_2, _('Running transaction'))
+         resultobject = self.runTransaction(cb=cb)
+ 
+         self.verbose_logger.debug('Transaction time: %0.3f' % (time.time() - ts_st))
 @@ -609,12 +702,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
          return resultobject.return_code
          
@@ -621,7 +694,7 @@ index 6056d38..4e57620
          # if there is no userlist, then do global update below
          # this is probably 90% of the calls
          # if there is a userlist then it's for updating pkgs, not obsoleting
-@@ -745,21 +935,18 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -745,34 +935,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
  
          else:
              # go through the userlist - look for items that are local rpms. If we find them
@@ -652,7 +725,12 @@ index 6056d38..4e57620
  
          if len(self.tsInfo) > oldcount:
              change = len(self.tsInfo) - oldcount
-@@ -770,9 +957,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+-            return 2, [P_('%d package marked for Update', '%d packages marked for Update', change) % change]
++            return 2, [P_('%d package marked for update', '%d packages marked for update', change) % change]
+         else:
+-            return 0, [_('No Packages marked for Update')]
++            return 0, [_('No packages marked for update')]
+ 
      #  Note that we aren't in __init__ yet for a couple of reasons, but we 
      # probably will get there for 3.2.28.
      def distroSyncPkgs(self, userlist):
@@ -688,9 +766,15 @@ index 6056d38..4e57620
                      for apkg in self.pkgSack.searchPkgTuple(napkg.pkgtup):
                          if ('checksum_type' in nayi and
                              'checksum_data' in nayi and
-@@ -865,15 +1068,54 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -861,19 +1064,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+                 dupdates.extend(self.downgrade(name=n, epoch=e, ver=v, rel=r))
+ 
+         if dupdates:
+-            return 2, [P_('%d package marked for Distribution Synchronization', '%d packages marked for Distribution Synchronization', len(dupdates)) % len(dupdates)]
++            return 2, [P_('%d package marked for distribution synchronization', '%d packages marked for distribution synchronization', len(dupdates)) % len(dupdates)]
          else:
-             return 0, [_('No Packages marked for Distribution Synchronization')]
+-            return 0, [_('No Packages marked for Distribution Synchronization')]
++            return 0, [_('No packages marked for distribution synchronization')]
  
 -    def erasePkgs(self, userlist):
 -        """take user commands and populate a transaction wrapper with packages
@@ -826,7 +910,7 @@ index 6056d38..4e57620
              except yum.Errors.ReinstallRemoveError:
                  self._checkMaybeYouMeant(arg, always_output=False)
              except yum.Errors.ReinstallInstallError, e:
-@@ -940,15 +1212,31 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -940,22 +1212,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
              except yum.Errors.ReinstallError, e:
                  assert False, "Shouldn't happen, but just in case"
                  self.verbose_logger.log(yum.logginglevels.INFO_2, e)
@@ -861,6 +945,14 @@ index 6056d38..4e57620
          # read in each package into a YumLocalPackage Object
          # append it to self.localPackages
          # check if it can be installed or updated based on nevra versus rpmdb
+         # don't import the repos until we absolutely need them for depsolving
+ 
+         if len(filelist) == 0:
+-            return 0, [_('No Packages Provided')]
++            return 0, [_('No packages provided')]
+ 
+         installing = False
+         for pkg in filelist:
 @@ -971,21 +1259,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
              return 2, [_('Package(s) to install')]
          return 0, [_('Nothing to do')]
@@ -941,7 +1033,21 @@ index 6056d38..4e57620
          
          # call the yum module search function with lists of tags to search
          # and what to search for
-@@ -1108,9 +1419,20 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1053,7 +1364,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+                         print ""
+                     else:
+                         mkeys = set(keys)
+-                    _print_match_section(_('N/S Matched: %s'))
++                    _print_match_section(_('N/S matched: %s'))
+                     okeys = keys
+                 pos.add(po)
+                 akeys.update(keys)
+@@ -1104,13 +1415,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+                 self.logger.warning(_('Warning: No matches found for: %s'), arg)
+ 
+         if not akeys:
+-            return 0, [_('No Matches found')]
++            return 0, [_('No matches found')]
          return 0, matching
  
      def deplist(self, args):
@@ -997,7 +1103,13 @@ index 6056d38..4e57620
                  if yum.misc.re_filename(arg) or yum.misc.re_glob(arg):
                      continue
                  for path in paths:
-@@ -1163,20 +1496,77 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1158,25 +1491,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+         self.conf.showdupesfromrepos = old_sdup
+ 
+         if len(matching) == 0:
+-            return 0, ['No Matches found']
++            return 0, ['No matches found']
+         
          return 0, []
      
      def resolveDepCli(self, args):
@@ -1043,7 +1155,7 @@ index 6056d38..4e57620
 +                                                        pkg.ui_from_repo))
 +
 +        if not_found:
-+            self.logger.critical(_('Error: No Packages found for:\n  %s'),
++            self.logger.critical(_('Error: No packages found for:\n  %s'),
 +                                 "\n  ".join(sorted(not_found)))
  
          return 0, []
@@ -1080,7 +1192,29 @@ index 6056d38..4e57620
          hdrcode = pkgcode = xmlcode = dbcode = expccode = 0
          pkgresults = hdrresults = xmlresults = dbresults = expcresults = []
          msg = self.fmtKeyValFill(_('Cleaning repos: '), 
-@@ -1228,130 +1618,257 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1184,7 +1574,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+         self.verbose_logger.log(yum.logginglevels.INFO_2, msg)
+         if 'all' in userlist:
+             self.verbose_logger.log(yum.logginglevels.INFO_2,
+-                _('Cleaning up Everything'))
++                _('Cleaning up everything'))
+             pkgcode, pkgresults = self.cleanPackages()
+             hdrcode, hdrresults = self.cleanHeaders()
+             xmlcode, xmlresults = self.cleanMetadata()
+@@ -1200,10 +1590,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+             return code, []
+             
+         if 'headers' in userlist:
+-            self.logger.debug(_('Cleaning up Headers'))
++            self.logger.debug(_('Cleaning up headers'))
+             hdrcode, hdrresults = self.cleanHeaders()
+         if 'packages' in userlist:
+-            self.logger.debug(_('Cleaning up Packages'))
++            self.logger.debug(_('Cleaning up packages'))
+             pkgcode, pkgresults = self.cleanPackages()
+         if 'metadata' in userlist:
+             self.logger.debug(_('Cleaning up xml metadata'))
+@@ -1228,138 +1618,265 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
          return code, []
  
      def returnGroupLists(self, userlist):
@@ -1249,8 +1383,8 @@ index 6056d38..4e57620
 -                return
 -            self.verbose_logger.log(yum.logginglevels.INFO_2, '%s %u', sect,num)
 -        done = 0
-+        _out_grp(_('Installed Environment Groups:'), ievgrps)
-+        _out_grp(_('Available Environment Groups:'), evgrps)
++        _out_grp(_('Installed environment groups:'), ievgrps)
++        _out_grp(_('Available environment groups:'), evgrps)
 +
 +        groups = []
          for group in installed:
@@ -1259,7 +1393,7 @@ index 6056d38..4e57620
 -        _out_grp(_('Installed Groups:'), done)
 +            if not wts['pkg']: continue
 +            groups.append(group)
-+        _out_grp(_('Installed Groups:'), groups)
++        _out_grp(_('Installed groups:'), groups)
  
 -        done = 0
 +        groups = []
@@ -1269,7 +1403,7 @@ index 6056d38..4e57620
 -        _out_grp(_('Installed Language Groups:'), done)
 +            if not wts['lang']: continue
 +            groups.append(group)
-+        _out_grp(_('Installed Language Groups:'), groups)
++        _out_grp(_('Installed language groups:'), groups)
  
 -        done = False
 +        groups = []
@@ -1289,10 +1423,10 @@ index 6056d38..4e57620
 -        _out_grp(_('Available Language Groups:'), done)
 +            if not wts['lang']: continue
 +            groups.append(group)
-+        _out_grp(_('Available Language Groups:'), groups)
++        _out_grp(_('Available language groups:'), groups)
 +
 +        if not done:
-+            self.logger.error(_('Warning: No Environments/Groups match: %s'),
++            self.logger.error(_('Warning: no environments/groups match: %s'),
 +                              ", ".join(ouserlist))
 +            return 0, []
  
@@ -1356,7 +1490,7 @@ index 6056d38..4e57620
  
              if not group_matched:
 -                self.logger.error(_('Warning: Group %s does not exist.'), strng)
-+                self.logger.error(_('Warning: Group/Environment %s does not exist.'), strng)
++                self.logger.error(_('Warning: group/environment %s does not exist.'), strng)
          
          return 0, []
          
@@ -1401,7 +1535,7 @@ index 6056d38..4e57620
 +                    txmbrs = self.selectEnvironment(group.environmentid,
 +                                                    upgrade=upgrade)
 +                except yum.Errors.GroupsError:
-+                    self.logger.critical(_('Warning: Environment %s does not exist.'), group_string)
++                    self.logger.critical(_('Warning: environment %s does not exist.'), group_string)
 +                    continue
 +                else:
 +                    pkgs_used.extend(txmbrs)
@@ -1416,8 +1550,18 @@ index 6056d38..4e57620
 -                    txmbrs = self.selectGroup(group.groupid)
 +                    txmbrs = self.selectGroup(group.groupid, upgrade=upgrade)
                  except yum.Errors.GroupsError:
-                     self.logger.critical(_('Warning: Group %s does not exist.'), group_string)
+-                    self.logger.critical(_('Warning: Group %s does not exist.'), group_string)
++                    self.logger.critical(_('Warning: group %s does not exist.'), group_string)
                      continue
+                 else:
+                     pkgs_used.extend(txmbrs)
+ 
+             if not group_matched:
+-                self.logger.error(_('Warning: Group %s does not exist.'), group_string)
++                self.logger.error(_('Warning: group %s does not exist.'), group_string)
+                 continue
+             
+         if not pkgs_used:
 @@ -1368,17 +1885,61 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
              return 2, [P_('%d package to Install', '%d packages to Install', len(pkgs_used)) % len(pkgs_used)]
  
@@ -1461,7 +1605,7 @@ index 6056d38..4e57620
 +                else:
 +                    groups = self.comps.return_environments(group_string)
 +                if not groups:
-+                    self.logger.critical(_('No Environment named %s exists'), group_string)
++                    self.logger.critical(_('No environment named %s exists'), group_string)
 +            for group in groups:
 +                try:
 +                    txmbrs = self.environmentRemove(group.environmentid)
@@ -1614,6 +1758,15 @@ index 6056d38..4e57620
              # Disable all gpg key checking, if requested.
              if opts.nogpgcheck:
                  #  Altering the normal configs. doesn't work too well, esp. with
+@@ -1623,7 +2203,7 @@ class YumOptionParser(OptionParser):
+                     repo._override_sigchecks = True
+                             
+         except ValueError, e:
+-            self.logger.critical(_('Options Error: %s'), e)
++            self.logger.critical(_('Options error: %s'), e)
+             self.base.usage()
+             sys.exit(1)
+          
 @@ -1640,10 +2220,18 @@ class YumOptionParser(OptionParser):
          sys.exit(1)
  
@@ -2430,7 +2583,7 @@ index 0000000..4d01a5a
 + the mailing list, yum at lists.baseurl.org, or consult bugzilla.
 +.fi
 diff --git a/docs/yum.8 b/docs/yum.8
-index 1a8202a..eef282b 100644
+index 1a8202a..82aeadd 100644
 --- a/docs/yum.8
 +++ b/docs/yum.8
 @@ -52,6 +52,7 @@ gnome\-packagekit application\&.
@@ -2714,7 +2867,7 @@ index 1a8202a..eef282b 100644
  In "history list" you can change the behaviour of the 2nd column via. the
  configuration option history_list_view.
  
-@@ -371,6 +482,15 @@ end of the package column in the packages-list command).
+@@ -371,6 +482,20 @@ end of the package column in the packages-list command).
  .I \fBs\fR - The transaction completed fine, but --skip-broken was enabled and had to skip some packages.
  .br
  
@@ -2727,10 +2880,15 @@ index 1a8202a..eef282b 100644
 +"yum -q history addon-info last saved_tx" or via. the automatic saves in
 +$TMPDIR/yum_save_tx.* when a transaction is solved but not run.
 +
++Running the command without an argument, or a directory as an argument will
++try and list the possible files available to load. Showing if the packages are
++still available, if the rpmdb matches the current rpmdb, how many transaction
++members are in the saved transaction and what the filename is.
++
  .IP
  .IP "\fBcheck\fP"
  Checks the local rpmdb and produces information on any problems it finds. You
-@@ -401,6 +521,11 @@ Assume yes; assume that the answer to any question which would be asked
+@@ -401,6 +526,11 @@ Assume yes; assume that the answer to any question which would be asked
  is yes\&.
  .br
  Configuration Option: \fBassumeyes\fP
@@ -2742,7 +2900,7 @@ index 1a8202a..eef282b 100644
  .IP "\fB\-c, \-\-config=[config file]\fP" 
  Specifies the config file location - can take HTTP and FTP URLs and local file
  paths\&.
-@@ -420,7 +545,7 @@ Sets the error level to [number] Practical range 0 \- 10. 0 means print only cri
+@@ -420,7 +550,7 @@ Sets the error level to [number] Practical range 0 \- 10. 0 means print only cri
  .br
  Configuration Option: \fBerrorlevel\fP
  .IP "\fB\-\-rpmverbosity=[name]\fP" 
@@ -2751,7 +2909,7 @@ index 1a8202a..eef282b 100644
  options are: 'critical', 'emergency', 'error', 'warn' and 'debug'.
  .br
  Configuration Option: \fBrpmverbosity\fP
-@@ -506,7 +631,14 @@ option will corrupt your cache (and you can use $releasever in your cachedir
+@@ -506,7 +636,14 @@ option will corrupt your cache (and you can use $releasever in your cachedir
  configuration to stop this).
  .PP 
  .IP "\fB\-t, \-\-tolerant\fP"
@@ -175805,7 +175963,7 @@ index 1ce4720..25e3022
      gobject.threads_init()
      dbus.glib.threads_init()
 diff --git a/yum.spec b/yum.spec
-index abd203f..7efc4bc 100644
+index abd203f..f18cce8 100644
 --- a/yum.spec
 +++ b/yum.spec
 @@ -1,24 +1,55 @@
@@ -175899,7 +176057,7 @@ index abd203f..7efc4bc 100644
 +Provides: yum-protect-packages = 1.1.27-0.yum
 +Provides: yum-plugin-protect-packages = 1.1.27-0.yum
 +Obsoletes: yum-plugin-download-order <= 0.2-2
-+Obsoletes: yum-plugin-downloadonly <= 1.1.31-6.fc19
++Obsoletes: yum-plugin-downloadonly <= 1.1.31-7.fc18
 +Provides: yum-plugin-downloadonly = 3.4.3-44.yum
 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 +
@@ -176179,7 +176337,7 @@ index c1af4ad..e3e3956 100644
      pass
      
 diff --git a/yum/__init__.py b/yum/__init__.py
-index 99039e0..932e362 100644
+index 99039e0..b884a23 100644
 --- a/yum/__init__.py
 +++ b/yum/__init__.py
 @@ -21,6 +21,7 @@ The Yum RPM software updater.
@@ -176832,7 +176990,7 @@ index 99039e0..932e362 100644
 +     message showing the root cause of the problem.
 +
 +  2. You have multiple architectures of %(name)s installed, but
-+     yum can only see an upgrade for one of those arcitectures.
++     yum can only see an upgrade for one of those architectures.
 +     If you don't want/need both architectures anymore then you
 +     can remove the one with the missing update and everything
 +     will work.
@@ -179786,7 +179944,7 @@ index 99039e0..932e362 100644
          msg += "%s\n" % len(self.tsInfo.getMembers())
          for txmbr in self.tsInfo.getMembers():
              msg += txmbr._dump()
-@@ -5260,13 +6462,25 @@ class YumBase(depsolve.Depsolve):
+@@ -5260,42 +6462,84 @@ class YumBase(depsolve.Depsolve):
          except (IOError, OSError), e:
              self._ts_save_file = None
              if auto:
@@ -179794,12 +179952,32 @@ index 99039e0..932e362 100644
 +                self.logger.critical(_("Could not save transaction file %s: %s") % (filename, exception2msg(e)))
              else:
 -                raise Errors.YumBaseError(_("Could not save transaction file %s: %s") % (filename, str(e)))
--
++                raise Errors.YumBaseError(_("Could not save transaction file %s: %s") % (filename, exception2msg(e)))
+ 
 -        
 -    def load_ts(self, filename, ignorerpm=None, ignoremissing=None):
 -        """loads a transaction from a .yumtx file"""
-+                raise Errors.YumBaseError(_("Could not save transaction file %s: %s") % (filename, exception2msg(e)))
++    def _load_ts_data(self, filename):
++        """ Load the file into a simple data format. """
++        try:
++            data = open(filename, 'r').readlines()
++        except (IOError, OSError), e:
++            return (exception2msg(e), None)
 +
++        if not data:
++            return (_("File is empty."), None)
++
++        if data[0] == 'saved_tx:\n':
++            #  Old versions of yum would put "saved_tx:" at the begining and
++            # two blank lines at the end when you used:
++            # "yum -q history addon-info saved_tx".
++            if data[-1] == 'history addon-info\n':
++                # Might as well also DTRT if they hand removed the plugins line
++                data = data[1:-3]
++            else:
++                data = data[1:-2]
++
++        return (None, data)
 +        
 +    def load_ts(self, filename, ignorerpm=None, ignoremissing=None,
 +                ignorenewrpm=None):
@@ -179818,13 +179996,19 @@ index 99039e0..932e362 100644
          # check rpmversion - if not match throw a fit
          # check repoversions  (and repos)- if not match throw a fit
          # load each txmbr - if pkgs being updated don't exist, bail w/error
-@@ -5276,26 +6490,45 @@ class YumBase(depsolve.Depsolve):
-         try:
-             data = open(filename, 'r').readlines()
-         except (IOError, OSError), e:
+         # setup any ts flags
+         # setup cmds for history/yumdb to know about
+         # return txmbrs loaded
+-        try:
+-            data = open(filename, 'r').readlines()
+-        except (IOError, OSError), e:
 -            raise Errors.YumBaseError(_("Could not access/read saved transaction %s : %s") % (filename, str(e)))
-+            raise Errors.YumBaseError(_("Could not access/read saved transaction %s : %s") % (filename, exception2msg(e)))
-             
+-            
++
++        data = self._load_ts_data(filename)
++        if data[0] is not None:
++            raise Errors.YumBaseError(_("Could not access/read saved transaction %s : %s") % (filename, data[0]))
++        data = data[1]
  
          if ignorerpm is None:
              ignorerpm = self.conf.loadts_ignorerpm
@@ -179847,16 +180031,7 @@ index 99039e0..932e362 100644
 +        #                         new rpmdb version.
          # 3+numrepos = num pkgs
          # 3+numrepos+1 -> EOF= txmembers
-         
-+        if data[0] == 'saved_tx:\n':
-+            #  Old versions of yum would put "saved_tx:" at the begining and
-+            # two blank lines at the end when you used:
-+            # "yum -q history addon-info saved_tx".
-+            if data[-1] == 'history addon-info\n':
-+                # Might as well also DTRT if they hand removed the plugins line
-+                data = data[1:-3]
-+            else:
-+                data = data[1:-2]
+-        
 +
          # rpm db ver
          rpmv = data[0].strip()
@@ -179866,7 +180041,7 @@ index 99039e0..932e362 100644
              if ignorerpm:
                  msg += _(" ignoring, as requested.")
                  self.logger.critical(_(msg))
-@@ -5318,8 +6551,17 @@ class YumBase(depsolve.Depsolve):
+@@ -5318,8 +6562,17 @@ class YumBase(depsolve.Depsolve):
          numrepos = int(data[2].strip())
          repos = []
          rindex=3+numrepos
@@ -179885,7 +180060,7 @@ index 99039e0..932e362 100644
  
          # pkgs/txmbrs
          numpkgs = int(data[rindex].strip())
-@@ -5329,6 +6571,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5329,6 +6582,7 @@ class YumBase(depsolve.Depsolve):
          pkgcount = 0
          pkgprob = False
          curpkg = None
@@ -179893,7 +180068,7 @@ index 99039e0..932e362 100644
          for l in data[pkgstart:]:
              l = l.rstrip()
              # our main txmbrs
-@@ -5356,6 +6599,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5356,6 +6610,7 @@ class YumBase(depsolve.Depsolve):
                      if not ignoremissing:
                          raise Errors.YumBaseError(msg)
                      else:
@@ -179901,7 +180076,7 @@ index 99039e0..932e362 100644
                          self.logger.critical(msg)
                  else:
                      pkgcount += 1
-@@ -5432,12 +6676,18 @@ class YumBase(depsolve.Depsolve):
+@@ -5432,12 +6687,18 @@ class YumBase(depsolve.Depsolve):
          if pkgprob:
              msg = _("Transaction members, relations are missing or ts has been modified,")
              if ignoremissing:
@@ -179920,7 +180095,7 @@ index 99039e0..932e362 100644
          return self.tsInfo.getMembers()
  
      def _remove_old_deps(self):
-@@ -5470,18 +6720,6 @@ class YumBase(depsolve.Depsolve):
+@@ -5470,18 +6731,6 @@ class YumBase(depsolve.Depsolve):
                      if requiring == required: # if they are self-requiring skip them
                          continue
                          
@@ -179939,7 +180114,7 @@ index 99039e0..932e362 100644
                      #for tbi_pkg in self.tsInfo.getMembersWithState(output_states=TS_INSTALL_STATES):
                      #   for reqtuple in tbi_pkg.po.requires:
                      #        if required.provides_for(reqtuple):
-@@ -5533,7 +6771,24 @@ class YumBase(depsolve.Depsolve):
+@@ -5533,7 +6782,24 @@ class YumBase(depsolve.Depsolve):
                      # Debugging output
                      self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has revdep %s which was user-installed."), pkg, curpkg)
                      ok_to_remove[pkg] = False
@@ -179964,7 +180139,7 @@ index 99039e0..932e362 100644
                  visited[curpkg] = True
              all_leaves_visited = True
              leaves = curpkg.requiring_packages()
-@@ -5547,4 +6802,3 @@ class YumBase(depsolve.Depsolve):
+@@ -5547,4 +6813,3 @@ class YumBase(depsolve.Depsolve):
          # Debugging output
          self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has no user-installed revdeps."), pkg)
          return False
@@ -186250,10 +186425,10 @@ index e5e9ece..efbc42a 100644
          fo = None
  
 diff --git a/yumcommands.py b/yumcommands.py
-index 4dcbea7..24d04e3 100644
+index 4dcbea7..1cc4fdf 100644
 --- a/yumcommands.py
 +++ b/yumcommands.py
-@@ -22,14 +22,14 @@ Classes for subcommands of the yum command line interface.
+@@ -22,14 +22,16 @@ Classes for subcommands of the yum command line interface.
  import os
  import cli
  from yum import logginglevels
@@ -186267,10 +186442,12 @@ index 4dcbea7..24d04e3 100644
  import time
 -from yum.i18n import utf8_width, utf8_width_fill, to_unicode
 +from yum.i18n import utf8_width, utf8_width_fill, to_unicode, exception2msg
++import tempfile
++import glob
  
  import yum.config
  
-@@ -43,16 +43,24 @@ def _err_mini_usage(base, basecmd):
+@@ -43,16 +45,24 @@ def _err_mini_usage(base, basecmd):
      base.logger.critical(txt)
  
  def checkRootUID(base):
@@ -186298,7 +186475,7 @@ index 4dcbea7..24d04e3 100644
      if not base.gpgKeyCheck():
          for repo in base.repos.listEnabled():
              if (repo.gpgcheck or repo.repo_gpgcheck) and not repo.gpgkey:
-@@ -75,31 +83,118 @@ For more information contact your distribution or package provider.
+@@ -75,31 +85,118 @@ For more information contact your distribution or package provider.
                  raise cli.CliError
  
  def checkPackageArg(base, basecmd, extcmds):
@@ -186417,7 +186594,7 @@ index 4dcbea7..24d04e3 100644
  
      for cmd in extcmds:
          if cmd not in VALID_ARGS:
-@@ -108,12 +203,14 @@ def checkCleanArg(base, basecmd, extcmds):
+@@ -108,12 +205,14 @@ def checkCleanArg(base, basecmd, extcmds):
              raise cli.CliError
  
  def checkShellArg(base, basecmd, extcmds):
@@ -186438,7 +186615,7 @@ index 4dcbea7..24d04e3 100644
      """
      if len(extcmds) == 0:
          base.verbose_logger.debug(_("No argument to shell"))
-@@ -133,10 +230,12 @@ def checkShellArg(base, basecmd, extcmds):
+@@ -133,10 +232,12 @@ def checkShellArg(base, basecmd, extcmds):
          raise cli.CliError
  
  def checkEnabledRepo(base, possible_local_files=[]):
@@ -186454,7 +186631,7 @@ index 4dcbea7..24d04e3 100644
      """
      if base.repos.listEnabled():
          return
-@@ -152,113 +251,301 @@ def checkEnabledRepo(base, possible_local_files=[]):
+@@ -152,113 +253,301 @@ def checkEnabledRepo(base, possible_local_files=[]):
      raise cli.CliError
  
  class YumCommand:
@@ -186772,7 +186949,7 @@ index 4dcbea7..24d04e3 100644
  
  def _add_pkg_simple_list_lens(data, pkg, indent=''):
      """ Get the length of each pkg's column. Add that to data.
-@@ -289,21 +576,57 @@ def _list_cmd_calc_columns(base, ypl):
+@@ -289,21 +578,57 @@ def _list_cmd_calc_columns(base, ypl):
      return (-columns[0], -columns[1], -columns[2])
  
  class InfoCommand(YumCommand):
@@ -186833,7 +187010,7 @@ index 4dcbea7..24d04e3 100644
          else:
              update_pkgs = {}
              inst_pkgs   = {}
-@@ -341,6 +664,7 @@ class InfoCommand(YumCommand):
+@@ -341,6 +666,7 @@ class InfoCommand(YumCommand):
                          local_pkgs[(po.name, po.arch)] = po
  
              # Output the packages:
@@ -186841,7 +187018,7 @@ index 4dcbea7..24d04e3 100644
              clio = base.conf.color_list_installed_older
              clin = base.conf.color_list_installed_newer
              clir = base.conf.color_list_installed_reinstall
-@@ -348,7 +672,9 @@ class InfoCommand(YumCommand):
+@@ -348,7 +674,9 @@ class InfoCommand(YumCommand):
              rip = base.listPkgs(ypl.installed, _('Installed Packages'), basecmd,
                                  highlight_na=update_pkgs, columns=columns,
                                  highlight_modes={'>' : clio, '<' : clin,
@@ -186851,7 +187028,7 @@ index 4dcbea7..24d04e3 100644
              clau = base.conf.color_list_available_upgrade
              clad = base.conf.color_list_available_downgrade
              clar = base.conf.color_list_available_reinstall
-@@ -356,6 +682,7 @@ class InfoCommand(YumCommand):
+@@ -356,6 +684,7 @@ class InfoCommand(YumCommand):
              rap = base.listPkgs(ypl.available, _('Available Packages'), basecmd,
                                  highlight_na=inst_pkgs, columns=columns,
                                  highlight_modes={'<' : clau, '>' : clad,
@@ -186859,7 +187036,7 @@ index 4dcbea7..24d04e3 100644
                                                   '=' : clar, 'not in' : clai})
              rep = base.listPkgs(ypl.extras, _('Extra Packages'), basecmd,
                                  columns=columns)
-@@ -374,7 +701,7 @@ class InfoCommand(YumCommand):
+@@ -374,7 +703,7 @@ class InfoCommand(YumCommand):
                  for obtup in sorted(ypl.obsoletesTuples,
                                      key=operator.itemgetter(0)):
                      base.updatesObsoletesList(obtup, 'obsoletes',
@@ -186868,7 +187045,7 @@ index 4dcbea7..24d04e3 100644
              else:
                  rop = base.listPkgs(ypl.obsoletes, _('Obsoleting Packages'),
                                      basecmd, columns=columns)
-@@ -389,45 +716,163 @@ class InfoCommand(YumCommand):
+@@ -389,45 +718,163 @@ class InfoCommand(YumCommand):
              return 0, []
  
      def needTs(self, base, basecmd, extcmds):
@@ -187035,7 +187212,7 @@ index 4dcbea7..24d04e3 100644
          return True
  
   
-@@ -442,12 +887,25 @@ class GroupsCommand(YumCommand):
+@@ -442,12 +889,25 @@ class GroupsCommand(YumCommand):
                         'groupinfo'    : 'info'}
  
      def getNames(self):
@@ -187061,7 +187238,7 @@ index 4dcbea7..24d04e3 100644
          return _("Display, or use, the groups information")
      
      def _grp_setup_doCommand(self, base):
-@@ -459,7 +917,7 @@ class GroupsCommand(YumCommand):
+@@ -459,7 +919,7 @@ class GroupsCommand(YumCommand):
          except yum.Errors.GroupsError:
              return 1, [_('No Groups on which to run command')]
          except yum.Errors.YumBaseError, e:
@@ -187070,7 +187247,7 @@ index 4dcbea7..24d04e3 100644
  
      def _grp_cmd(self, basecmd, extcmds):
          if basecmd in self.direct_commands:
-@@ -470,6 +928,10 @@ class GroupsCommand(YumCommand):
+@@ -470,6 +930,10 @@ class GroupsCommand(YumCommand):
          else:
              cmd = 'summary'
  
@@ -187081,7 +187258,7 @@ index 4dcbea7..24d04e3 100644
          remap = {'update' : 'upgrade',
                   'erase' : 'remove',
                   'mark-erase' : 'mark-remove',
-@@ -479,32 +941,76 @@ class GroupsCommand(YumCommand):
+@@ -479,32 +943,76 @@ class GroupsCommand(YumCommand):
          return cmd, extcmds
  
      def doCheck(self, base, basecmd, extcmds):
@@ -187168,7 +187345,7 @@ index 4dcbea7..24d04e3 100644
          cmd, extcmds = self._grp_cmd(basecmd, extcmds)
  
          self._grp_setup_doCommand(base)
-@@ -524,39 +1030,258 @@ class GroupsCommand(YumCommand):
+@@ -524,39 +1032,258 @@ class GroupsCommand(YumCommand):
              if cmd == 'remove':
                  return base.removeGroups(extcmds)
  
@@ -187429,7 +187606,7 @@ index 4dcbea7..24d04e3 100644
          base.logger.debug(_("Making cache files for all metadata files."))
          base.logger.debug(_("This may take a while depending on the speed of this computer"))
          try:
-@@ -565,81 +1290,227 @@ class MakeCacheCommand(YumCommand):
+@@ -565,81 +1292,227 @@ class MakeCacheCommand(YumCommand):
                  repo.mdpolicy = "group:all"
              base.doRepoSetup(dosack=0)
              base.repos.doSetup()
@@ -187664,7 +187841,7 @@ index 4dcbea7..24d04e3 100644
          obscmds = ['obsoletes'] + extcmds
          base.extcmds.insert(0, 'updates')
          result = 0
-@@ -676,161 +1547,480 @@ class CheckUpdateCommand(YumCommand):
+@@ -676,161 +1549,480 @@ class CheckUpdateCommand(YumCommand):
                                                columns=columns)
                  result = 100
          except yum.Errors.YumBaseError, e:
@@ -188154,7 +188331,7 @@ index 4dcbea7..24d04e3 100644
          def _repo_size(repo):
              ret = 0
              for pkg in repo.sack.returnPackages():
-@@ -857,7 +2047,10 @@ class RepoListCommand(YumCommand):
+@@ -857,7 +2049,10 @@ class RepoListCommand(YumCommand):
              arg = 'enabled'
          extcmds = map(lambda x: x.lower(), extcmds)
  
@@ -188166,7 +188343,7 @@ index 4dcbea7..24d04e3 100644
          if arg != 'disabled' or extcmds:
              try:
                  # Setup so len(repo.sack) is correct
-@@ -866,6 +2059,13 @@ class RepoListCommand(YumCommand):
+@@ -866,6 +2061,13 @@ class RepoListCommand(YumCommand):
              except yum.Errors.RepoError:
                  if verbose:
                      raise
@@ -188180,7 +188357,7 @@ index 4dcbea7..24d04e3 100644
  
          repos = base.repos.repos.values()
          repos.sort()
-@@ -924,111 +2124,108 @@ class RepoListCommand(YumCommand):
+@@ -924,111 +2126,108 @@ class RepoListCommand(YumCommand):
                  ui_enabled = dhibeg + _('disabled') + hiend
                  ui_endis_wid = utf8_width(_('disabled'))
  
@@ -188385,7 +188562,7 @@ index 4dcbea7..24d04e3 100644
  
          if not verbose and cols:
              #  Work out the first (id) and last (enabled/disalbed/count),
-@@ -1088,21 +2285,64 @@ class RepoListCommand(YumCommand):
+@@ -1088,21 +2287,64 @@ class RepoListCommand(YumCommand):
          return 0, ['repolist: ' +to_unicode(locale.format("%d", tot_num, True))]
  
      def needTs(self, base, basecmd, extcmds):
@@ -188450,7 +188627,7 @@ index 4dcbea7..24d04e3 100644
          if len(extcmds) == 0:
              base.usage()
              raise cli.CliError
-@@ -1147,28 +2387,85 @@ class HelpCommand(YumCommand):
+@@ -1147,28 +2389,85 @@ class HelpCommand(YumCommand):
          return help_output
  
      def doCommand(self, base, basecmd, extcmds):
@@ -188536,7 +188713,7 @@ index 4dcbea7..24d04e3 100644
          self.doneCommand(base, _("Setting up Reinstall Process"))
          try:
              return base.reinstallPkgs(extcmds)
-@@ -1177,49 +2474,139 @@ class ReInstallCommand(YumCommand):
+@@ -1177,49 +2476,139 @@ class ReInstallCommand(YumCommand):
              return 1, [to_unicode(e)]
  
      def getSummary(self):
@@ -188677,7 +188854,7 @@ index 4dcbea7..24d04e3 100644
          vcmd = 'installed'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1308,7 +2695,7 @@ class VersionCommand(YumCommand):
+@@ -1308,7 +2697,7 @@ class VersionCommand(YumCommand):
                                       str(data[2][grp])))
                          _append_repos(cols, data[3][grp])
              except yum.Errors.YumBaseError, e:
@@ -188686,7 +188863,7 @@ index 4dcbea7..24d04e3 100644
          if vcmd in ('available', 'all', 'group-available', 'group-all'):
              try:
                  data = base.pkgSack.simpleVersion(not verbose, groups=groups)
-@@ -1327,7 +2714,7 @@ class VersionCommand(YumCommand):
+@@ -1327,7 +2716,7 @@ class VersionCommand(YumCommand):
                          if verbose:
                              _append_repos(cols, data[3][grp])
              except yum.Errors.YumBaseError, e:
@@ -188695,7 +188872,7 @@ index 4dcbea7..24d04e3 100644
  
          data = {'rid' : {}, 'ver' : {}}
          for (rid, ver) in cols:
-@@ -1344,6 +2731,14 @@ class VersionCommand(YumCommand):
+@@ -1344,6 +2733,14 @@ class VersionCommand(YumCommand):
          return 0, ['version']
  
      def needTs(self, base, basecmd, extcmds):
@@ -188710,7 +188887,7 @@ index 4dcbea7..24d04e3 100644
          vcmd = 'installed'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1352,25 +2747,74 @@ class VersionCommand(YumCommand):
+@@ -1352,25 +2749,74 @@ class VersionCommand(YumCommand):
              return True
          return vcmd in ('available', 'all', 'group-available', 'group-all')
  
@@ -188786,7 +188963,7 @@ index 4dcbea7..24d04e3 100644
              return 2, ["Repeating transaction %u" % (old.tid,)]
  
      def _hcmd_undo(self, base, extcmds):
-@@ -1426,12 +2870,57 @@ class HistoryCommand(YumCommand):
+@@ -1426,12 +2872,57 @@ class HistoryCommand(YumCommand):
      def _hcmd_new(self, base, extcmds):
          base.history._create_db_file()
  
@@ -188845,7 +189022,7 @@ index 4dcbea7..24d04e3 100644
          if extcmds and extcmds[0] not in cmds:
              base.logger.critical(_('Invalid history sub-command, use: %s.'),
                                   ", ".join(cmds))
-@@ -1444,6 +2933,19 @@ class HistoryCommand(YumCommand):
+@@ -1444,6 +2935,19 @@ class HistoryCommand(YumCommand):
              raise cli.CliError
  
      def doCommand(self, base, basecmd, extcmds):
@@ -188865,7 +189042,7 @@ index 4dcbea7..24d04e3 100644
          vcmd = 'list'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1468,29 +2970,88 @@ class HistoryCommand(YumCommand):
+@@ -1468,29 +2972,88 @@ class HistoryCommand(YumCommand):
              ret = self._hcmd_rollback(base, extcmds)
          elif vcmd == 'new':
              ret = self._hcmd_new(base, extcmds)
@@ -188954,7 +189131,7 @@ index 4dcbea7..24d04e3 100644
          chkcmd = 'all'
          if extcmds:
              chkcmd = extcmds
-@@ -1505,19 +3066,58 @@ class CheckRpmdbCommand(YumCommand):
+@@ -1505,24 +3068,137 @@ class CheckRpmdbCommand(YumCommand):
          return rc, ['%s %s' % (basecmd, chkcmd)]
  
      def needTs(self, base, basecmd, extcmds):
@@ -188975,12 +189152,13 @@ index 4dcbea7..24d04e3 100644
 +    """
 +
      def getNames(self):
+-        return ['load-transaction', 'load-ts']
 +        """Return a list containing the names of this command.  This
 +        command can be called from the command line by using any of these names.
 +
 +        :return: a list containing the names of this command
 +        """
-         return ['load-transaction', 'load-ts']
++        return ['load-transaction', 'load-ts', 'ts-load']
  
      def getUsage(self):
 +        """Return a usage string for this command.
@@ -189010,10 +189188,91 @@ index 4dcbea7..24d04e3 100644
 +            1 = we've errored, exit with error string
 +            2 = we've got work yet to do, onto the next stage
 +        """
++        def _pkg_avail(l):
++            if not l.startswith('mbr:'):
++                return True # Kind of ... 
++
++            try:
++                pkgtup, current_state = l.split(':')[1].strip().split(' ')
++                current_state = int(current_state.strip())
++                pkgtup = tuple(pkgtup.strip().split(','))
++                if current_state == yum.TS_INSTALL:
++                    po = base.getInstalledPackageObject(pkgtup)
++                elif current_state == yum.TS_AVAILABLE:
++                    po = base.getPackageObject(pkgtup)
++                else:
++                    return False # Bad...
++            except:
++                return False # Bad...
++
++            return True
++
          if not extcmds:
-             base.logger.critical(_("No saved transaction file specified."))
-             raise cli.CliError
-@@ -1533,5 +3133,322 @@ class LoadTransactionCommand(YumCommand):
+-            base.logger.critical(_("No saved transaction file specified."))
+-            raise cli.CliError
++            extcmds = [tempfile.gettempdir()]
+         
+         load_file = extcmds[0]
++
++        if os.path.isdir(load_file):
++            self.doneCommand(base, _("showing transaction files from %s") %
++                             load_file)
++            yumtxs = sorted(glob.glob("%s/*.yumtx" % load_file))
++            currpmv = None
++            done = False
++            for yumtx in yumtxs:
++                data = base._load_ts_data(yumtx)
++                if data[0] is not None:
++                    continue # Bad file...
++                data = data[1]
++
++                rpmv = data[0].strip()
++                if currpmv is None:
++                    currpmv = str(base.rpmdb.simpleVersion(main_only=True)[0])
++                if rpmv == currpmv:
++                    current = _('y')
++                else:
++                    current = ' ' # Not usable is the most common
++
++                # See load_ts() for data ...
++                try:
++                    numrepos = int(data[2].strip())
++                    pkgstart = 3+numrepos
++                    numpkgs  = int(data[pkgstart].strip())
++                    pkgstart += 1
++                except:
++                    continue
++
++                # Check to see if all the packages are available..
++                bad = ' '
++                for l in data[pkgstart:]:
++                    l = l.rstrip()
++                    if _pkg_avail(l):
++                        continue
++
++                    bad = '*'
++                    break
++
++                current = '%s%s' % (bad, current)
++                if not done:
++                    pkgtitle = _("Members")
++                    pkglen = utf8_width(pkgtitle)
++                    if pkglen < 6:
++                        pkglen = 6
++                    pkgtitle = utf8_width_fill(pkgtitle, pkglen)
++                    print "?? |", pkgtitle, "|", _("Filename")
++                    
++                    done = True
++
++                numpkgs = "%*s" % (pkglen, locale.format("%d", numpkgs, True))
++                print current, '|', numpkgs, '|', os.path.basename(yumtx)
++            return 0, [_('Saved transactions from %s; looked at %u files') %
++                       (load_file, len(yumtxs))]
++
+         self.doneCommand(base, _("loading transaction from %s") % load_file)
+         
+         try:
+@@ -1533,5 +3209,322 @@ class LoadTransactionCommand(YumCommand):
  
  
      def needTs(self, base, basecmd, extcmds):
@@ -189053,7 +189312,7 @@ index 4dcbea7..24d04e3 100644
 +
 +        :return: a one line summary of this command
 +        """
-+        return _("Simple way to swap packages, isntead of using shell")
++        return _("Simple way to swap packages, instead of using shell")
 +
 +    def doCheck(self, base, basecmd, extcmds):
 +        """Verify that conditions are met so that this command can run.
diff --git a/yum.spec b/yum.spec
index 4ce581f..1aa4dfc 100644
--- a/yum.spec
+++ b/yum.spec
@@ -18,7 +18,7 @@
 Summary: RPM package installer/updater/manager
 Name: yum
 Version: 3.4.3
-Release: 58%{?dist}
+Release: 59%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -94,7 +94,7 @@ Obsoletes: yum-plugin-protect-packages < 1.1.27-0
 Provides: yum-protect-packages = 1.1.27-0.yum
 Provides: yum-plugin-protect-packages = 1.1.27-0.yum
 Obsoletes: yum-plugin-download-order <= 0.2-2
-Obsoletes: yum-plugin-downloadonly <= 1.1.31-6.fc19
+Obsoletes: yum-plugin-downloadonly <= 1.1.31-7.fc18
 Provides: yum-plugin-downloadonly = 3.4.3-44.yum
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -302,6 +302,11 @@ fi
 %endif
 
 %changelog
+* Fri Feb 15 2013 James Antill <james at fedoraproject.org> - 3.4.3-59
+- update to latest HEAD.
+- Add load-ts helper.
+- Update downloadonly plugin version obs.
+
 * Fri Feb  8 2013 James Antill <james at fedoraproject.org> - 3.4.3-58
 - update to latest HEAD.
 - Add pyxattr require for origin_urls for everyone.


More information about the scm-commits mailing list