Ignore:
Timestamp:
Feb 3, 2015, 9:39:54 AM (11 years ago)
Author:
Yuri Dario
Message:

yum: update trunk to 3.4.3.

Location:
yum/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • yum/trunk

  • yum/trunk/yumcommands.py

    r2 r516  
    3434import yum.config
    3535
     36def _err_mini_usage(base, basecmd):
     37    if basecmd not in base.yum_cli_commands:
     38        base.usage()
     39        return
     40    cmd = base.yum_cli_commands[basecmd]
     41    txt = base.yum_cli_commands["help"]._makeOutput(cmd)
     42    base.logger.critical(_(' Mini usage:\n'))
     43    base.logger.critical(txt)
     44
    3645def checkRootUID(base):
    3746    """
     
    4756    if not base.gpgKeyCheck():
    4857        for repo in base.repos.listEnabled():
    49             if (repo.gpgcheck or repo.repo_gpgcheck) and repo.gpgkey == '':
     58            if (repo.gpgcheck or repo.repo_gpgcheck) and not repo.gpgkey:
    5059                msg = _("""
    5160You have enabled checking of packages via GPG keys. This is a good thing.
     
    6372""")
    6473                base.logger.critical(msg)
     74                base.logger.critical(_("Problem repository: %s"), repo)
    6575                raise cli.CliError
    6676
     
    6979        base.logger.critical(
    7080                _('Error: Need to pass a list of pkgs to %s') % basecmd)
    71         base.usage()
     81        _err_mini_usage(base, basecmd)
    7282        raise cli.CliError
    7383
     
    7585    if len(extcmds) == 0:
    7686        base.logger.critical(_('Error: Need an item to match'))
    77         base.usage()
     87        _err_mini_usage(base, basecmd)
    7888        raise cli.CliError
    7989
     
    8191    if len(extcmds) == 0:
    8292        base.logger.critical(_('Error: Need a group or list of groups'))
    83         base.usage()
     93        _err_mini_usage(base, basecmd)
    8494        raise cli.CliError   
    8595
     
    95105        if cmd not in VALID_ARGS:
    96106            base.logger.critical(_('Error: invalid clean argument: %r') % cmd)
    97             base.usage()
     107            _err_mini_usage(base, basecmd)
    98108            raise cli.CliError
    99109
     
    123133        raise cli.CliError
    124134
     135def checkEnabledRepo(base, possible_local_files=[]):
     136    """
     137    Verify that there is at least one enabled repo.
     138
     139    @param base: a YumBase object.
     140    """
     141    if base.repos.listEnabled():
     142        return
     143
     144    for lfile in possible_local_files:
     145        if lfile.endswith(".rpm") and os.path.exists(lfile):
     146            return
     147
     148    msg = _('There are no enabled repos.\n'
     149            ' Run "yum repolist all" to see the repos you have.\n'
     150            ' You can enable repos with yum-config-manager --enable <repo>')
     151    base.logger.critical(msg)
     152    raise cli.CliError
     153
    125154class YumCommand:
    126155       
    127156    def __init__(self):
    128157        self.done_command_once = False
     158        self.hidden = False
    129159
    130160    def doneCommand(self, base, msg, *args):
    131161        if not self.done_command_once:
    132             base.verbose_logger.log(logginglevels.INFO_2, msg, *args)
     162            base.verbose_logger.info(msg, *args)
    133163        self.done_command_once = True
    134164
     
    177207        checkGPGKey(base)
    178208        checkPackageArg(base, basecmd, extcmds)
     209        checkEnabledRepo(base, extcmds)
    179210
    180211    def doCommand(self, base, basecmd, extcmds):
     
    187218class UpdateCommand(YumCommand):
    188219    def getNames(self):
    189         return ['update']
     220        return ['update', 'update-to']
    190221
    191222    def getUsage(self):
     
    198229        checkRootUID(base)
    199230        checkGPGKey(base)
     231        checkEnabledRepo(base, extcmds)
    200232
    201233    def doCommand(self, base, basecmd, extcmds):
    202234        self.doneCommand(base, _("Setting up Update Process"))
    203235        try:
    204             return base.updatePkgs(extcmds)
     236            return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
     237        except yum.Errors.YumBaseError, e:
     238            return 1, [str(e)]
     239
     240class DistroSyncCommand(YumCommand):
     241    def getNames(self):
     242        return ['distribution-synchronization', 'distro-sync']
     243
     244    def getUsage(self):
     245        return _("[PACKAGE...]")
     246
     247    def getSummary(self):
     248        return _("Synchronize installed packages to the latest available versions")
     249
     250    def doCheck(self, base, basecmd, extcmds):
     251        checkRootUID(base)
     252        checkGPGKey(base)
     253        checkEnabledRepo(base, extcmds)
     254
     255    def doCommand(self, base, basecmd, extcmds):
     256        self.doneCommand(base, _("Setting up Distribution Synchronization Process"))
     257        try:
     258            base.conf.obsoletes = 1
     259            return base.distroSyncPkgs(extcmds)
    205260        except yum.Errors.YumBaseError, e:
    206261            return 1, [str(e)]
     
    239294
    240295    def getUsage(self):
    241         return "[PACKAGE|all|installed|updates|extras|obsoletes|recent]"
     296        return "[PACKAGE|all|available|installed|updates|extras|obsoletes|recent]"
    242297
    243298    def getSummary(self):
     
    376431        return True
    377432
    378 class GroupCommand(YumCommand):
    379     def doCommand(self, base, basecmd, extcmds):
     433 
     434class GroupsCommand(YumCommand):
     435    """ Single sub-command interface for most groups interaction. """
     436
     437    direct_commands = {'grouplist'    : 'list',
     438                       'groupinstall' : 'install',
     439                       'groupupdate'  : 'install',
     440                       'groupremove'  : 'remove',
     441                       'grouperase'   : 'remove',
     442                       'groupinfo'    : 'info'}
     443
     444    def getNames(self):
     445        return ['groups', 'group'] + self.direct_commands.keys()
     446
     447    def getUsage(self):
     448        return "[list|info|summary|install|upgrade|remove|mark] [GROUP]"
     449
     450    def getSummary(self):
     451        return _("Display, or use, the groups information")
     452   
     453    def _grp_setup_doCommand(self, base):
    380454        self.doneCommand(base, _("Setting up Group Process"))
    381455
     
    388462            return 1, [str(e)]
    389463
    390 
    391 class GroupListCommand(GroupCommand):
    392     def getNames(self):
    393         return ['grouplist']
     464    def _grp_cmd(self, basecmd, extcmds):
     465        if basecmd in self.direct_commands:
     466            cmd = self.direct_commands[basecmd]
     467        elif extcmds:
     468            cmd = extcmds[0]
     469            extcmds = extcmds[1:]
     470        else:
     471            cmd = 'summary'
     472
     473        remap = {'update' : 'upgrade',
     474                 'erase' : 'remove',
     475                 'mark-erase' : 'mark-remove',
     476                 }
     477        cmd = remap.get(cmd, cmd)
     478
     479        return cmd, extcmds
     480
     481    def doCheck(self, base, basecmd, extcmds):
     482        cmd, extcmds = self._grp_cmd(basecmd, extcmds)
     483
     484        checkEnabledRepo(base)
     485
     486        if cmd in ('install', 'remove',
     487                   'mark-install', 'mark-remove',
     488                   'mark-members', 'info', 'mark-members-sync'):
     489            checkGroupArg(base, cmd, extcmds)
     490
     491        if cmd in ('install', 'remove', 'upgrade',
     492                   'mark-install', 'mark-remove',
     493                   'mark-members', 'mark-members-sync'):
     494            checkRootUID(base)
     495
     496        if cmd in ('install', 'upgrade'):
     497            checkGPGKey(base)
     498
     499        cmds = ('list', 'info', 'remove', 'install', 'upgrade', 'summary',
     500                'mark-install', 'mark-remove',
     501                'mark-members', 'mark-members-sync')
     502        if cmd not in cmds:
     503            base.logger.critical(_('Invalid groups sub-command, use: %s.'),
     504                                 ", ".join(cmds))
     505            raise cli.CliError
     506
     507    def doCommand(self, base, basecmd, extcmds):
     508        cmd, extcmds = self._grp_cmd(basecmd, extcmds)
     509
     510        self._grp_setup_doCommand(base)
     511        if cmd == 'summary':
     512            return base.returnGroupSummary(extcmds)
     513
     514        if cmd == 'list':
     515            return base.returnGroupLists(extcmds)
     516
     517        try:
     518            if cmd == 'info':
     519                return base.returnGroupInfo(extcmds)
     520            if cmd == 'install':
     521                return base.installGroups(extcmds)
     522            if cmd == 'upgrade':
     523                return base.installGroups(extcmds, upgrade=True)
     524            if cmd == 'remove':
     525                return base.removeGroups(extcmds)
     526
     527        except yum.Errors.YumBaseError, e:
     528            return 1, [str(e)]
     529
     530
     531    def needTs(self, base, basecmd, extcmds):
     532        cmd, extcmds = self._grp_cmd(basecmd, extcmds)
     533
     534        if cmd in ('list', 'info', 'remove', 'summary'):
     535            return False
     536        return True
     537
     538    def needTsRemove(self, base, basecmd, extcmds):
     539        cmd, extcmds = self._grp_cmd(basecmd, extcmds)
     540
     541        if cmd in ('remove',):
     542           return True
     543        return False
     544
     545class MakeCacheCommand(YumCommand):
     546
     547    def getNames(self):
     548        return ['makecache']
    394549
    395550    def getUsage(self):
     
    397552
    398553    def getSummary(self):
    399         return _("List available package groups")
    400    
    401     def doCommand(self, base, basecmd, extcmds):
    402         GroupCommand.doCommand(self, base, basecmd, extcmds)
    403         return base.returnGroupLists(extcmds)
    404 
    405     def needTs(self, base, basecmd, extcmds):
    406         return False
    407 
    408 class GroupInstallCommand(GroupCommand):
    409     def getNames(self):
    410         return ['groupinstall', 'groupupdate']
    411 
    412     def getUsage(self):
    413         return "GROUP..."
    414 
    415     def getSummary(self):
    416         return _("Install the packages in a group on your system")
    417    
    418     def doCheck(self, base, basecmd, extcmds):
    419         checkRootUID(base)
    420         checkGPGKey(base)
    421         checkGroupArg(base, basecmd, extcmds)
    422 
    423     def doCommand(self, base, basecmd, extcmds):
    424         GroupCommand.doCommand(self, base, basecmd, extcmds)
    425         try:
    426             return base.installGroups(extcmds)
    427         except yum.Errors.YumBaseError, e:
    428             return 1, [str(e)]
    429 
    430 class GroupRemoveCommand(GroupCommand):
    431     def getNames(self):
    432         return ['groupremove', 'grouperase']
    433 
    434     def getUsage(self):
    435         return "GROUP..."
    436 
    437     def getSummary(self):
    438         return _("Remove the packages in a group from your system")
    439 
    440     def doCheck(self, base, basecmd, extcmds):
    441         checkRootUID(base)
    442         checkGroupArg(base, basecmd, extcmds)
    443 
    444     def doCommand(self, base, basecmd, extcmds):
    445         GroupCommand.doCommand(self, base, basecmd, extcmds)
    446         try:
    447             return base.removeGroups(extcmds)
    448         except yum.Errors.YumBaseError, e:
    449             return 1, [str(e)]
    450 
    451     def needTs(self, base, basecmd, extcmds):
    452         return False
    453 
    454     def needTsRemove(self, base, basecmd, extcmds):
    455         return True
    456 
    457 class GroupInfoCommand(GroupCommand):
    458     def getNames(self):
    459         return ['groupinfo']
    460 
    461     def getUsage(self):
    462         return "GROUP..."
    463 
    464     def getSummary(self):
    465         return _("Display details about a package group")
    466 
    467     def doCheck(self, base, basecmd, extcmds):
    468         checkGroupArg(base, basecmd, extcmds)
    469 
    470     def doCommand(self, base, basecmd, extcmds):
    471         GroupCommand.doCommand(self, base, basecmd, extcmds)
    472         try:
    473             return base.returnGroupInfo(extcmds)
    474         except yum.Errors.YumBaseError, e:
    475             return 1, [str(e)]
    476 
    477     def needTs(self, base, basecmd, extcmds):
    478         return False
    479 
    480 class MakeCacheCommand(YumCommand):
    481 
    482     def getNames(self):
    483         return ['makecache']
    484 
    485     def getUsage(self):
    486         return ""
    487 
    488     def getSummary(self):
    489554        return _("Generate the metadata cache")
    490555
    491556    def doCheck(self, base, basecmd, extcmds):
    492         pass
     557        checkEnabledRepo(base)
    493558
    494559    def doCommand(self, base, basecmd, extcmds):
     
    533598    def doCheck(self, base, basecmd, extcmds):
    534599        checkCleanArg(base, basecmd, extcmds)
     600        checkEnabledRepo(base)
    535601       
    536602    def doCommand(self, base, basecmd, extcmds):
     
    571637        return _("Check for available package updates")
    572638
    573     def doCommand(self, base, basecmd, extcmds):
     639    def doCheck(self, base, basecmd, extcmds):
     640        checkEnabledRepo(base)
     641
     642    def doCommand(self, base, basecmd, extcmds):
     643        obscmds = ['obsoletes'] + extcmds
    574644        base.extcmds.insert(0, 'updates')
    575645        result = 0
     
    578648            if (base.conf.obsoletes or
    579649                base.verbose_logger.isEnabledFor(logginglevels.DEBUG_3)):
    580                 typl = base.returnPkgLists(['obsoletes'])
     650                typl = base.returnPkgLists(obscmds)
    581651                ypl.obsoletes = typl.obsoletes
    582652                ypl.obsoletesTuples = typl.obsoletesTuples
     
    636706class UpgradeCommand(YumCommand):
    637707    def getNames(self):
    638         return ['upgrade']
     708        return ['upgrade', 'upgrade-to']
    639709
    640710    def getUsage(self):
     
    647717        checkRootUID(base)
    648718        checkGPGKey(base)
     719        checkEnabledRepo(base, extcmds)
    649720
    650721    def doCommand(self, base, basecmd, extcmds):
     
    652723        self.doneCommand(base, _("Setting up Upgrade Process"))
    653724        try:
    654             return base.updatePkgs(extcmds)
     725            return base.updatePkgs(extcmds, update_to=(basecmd == 'upgrade-to'))
    655726        except yum.Errors.YumBaseError, e:
    656727            return 1, [str(e)]
    657728
    658729class LocalInstallCommand(YumCommand):
     730    def __init__(self):
     731        YumCommand.__init__(self)
     732        self.hidden = True
     733
    659734    def getNames(self):
    660735        return ['localinstall', 'localupdate']
     
    913988                        out += [base.fmtKeyValFill(_("Repo-mirrors : "),
    914989                                                   repo.mirrorlist)]
     990                    if enabled and repo.urls and not baseurls:
     991                        url = repo.urls[0]
     992                        if len(repo.urls) > 1:
     993                            url += ' (%d more)' % (len(repo.urls) - 1)
     994                        out += [base.fmtKeyValFill(_("Repo-baseurl : "),
     995                                                   url)]
    915996
    916997                    if not os.path.exists(repo.metadata_cookie):
     
    9411022                        out += [base.fmtKeyValFill(_("Repo-excluded: "),
    9421023                                                   ui_excludes_num)]
     1024
     1025                    if repo.repofile:
     1026                        out += [base.fmtKeyValFill(_("Repo-filename: "),
     1027                                                   repo.repofile)]
    9431028
    9441029                    base.verbose_logger.log(logginglevels.DEBUG_3,
     
    9811066            txt_rnam = utf8_width_fill(_('repo name'), nm_len, nm_len)
    9821067            if arg == 'disabled': # Don't output a status column.
    983                 base.verbose_logger.log(logginglevels.INFO_2,"%s %s",
     1068                base.verbose_logger.info("%s %s",
    9841069                                        txt_rid, txt_rnam)
    9851070            else:
    986                 base.verbose_logger.log(logginglevels.INFO_2,"%s %s %s",
     1071                base.verbose_logger.info("%s %s %s",
    9871072                                        txt_rid, txt_rnam, _('status'))
    9881073            for (rid, rname, (ui_enabled, ui_endis_wid), ui_num) in cols:
    9891074                if arg == 'disabled': # Don't output a status column.
    990                     base.verbose_logger.log(logginglevels.INFO_2, "%s %s",
     1075                    base.verbose_logger.info("%s %s",
    9911076                                            utf8_width_fill(rid, id_len),
    9921077                                            utf8_width_fill(rname, nm_len,
     
    9961081                if ui_num:
    9971082                    ui_num = utf8_width_fill(ui_num, ui_len, left=False)
    998                 base.verbose_logger.log(logginglevels.INFO_2, "%s %s %s%s",
     1083                base.verbose_logger.info("%s %s %s%s",
    9991084                                        utf8_width_fill(rid, id_len),
    10001085                                        utf8_width_fill(rname, nm_len, nm_len),
     
    10651150        if extcmds[0] in base.yum_cli_commands:
    10661151            command = base.yum_cli_commands[extcmds[0]]
    1067             base.verbose_logger.log(logginglevels.INFO_2,
    1068                     self._makeOutput(command))
     1152            base.verbose_logger.info(self._makeOutput(command))
    10691153        return 0, []
    10701154
     
    10831167        checkGPGKey(base)
    10841168        checkPackageArg(base, basecmd, extcmds)
     1169        checkEnabledRepo(base, extcmds)
    10851170
    10861171    def doCommand(self, base, basecmd, extcmds):
     
    11091194        checkGPGKey(base)
    11101195        checkPackageArg(base, basecmd, extcmds)
     1196        checkEnabledRepo(base, extcmds)
    11111197
    11121198    def doCommand(self, base, basecmd, extcmds):
     
    12081294                if lastdbv is not None:
    12091295                    lastdbv = lastdbv.end_rpmdbversion
    1210                 if lastdbv is None or data[0] != lastdbv:
     1296                if lastdbv is not None and data[0] != lastdbv:
    12111297                    base._rpmdb_warn_checks(warn=lastdbv is not None)
    12121298                if vcmd not in ('group-installed', 'group-all'):
     
    12161302                if groups:
    12171303                    for grp in sorted(data[2]):
     1304                        if (vcmd.startswith("group-") and
     1305                            len(extcmds) > 1 and grp not in extcmds[1:]):
     1306                            continue
    12181307                        cols.append(("%s %s" % (_("Group-Installed:"), grp),
    12191308                                     str(data[2][grp])))
     
    12311320                if groups:
    12321321                    for grp in sorted(data[2]):
     1322                        if (vcmd.startswith("group-") and
     1323                            len(extcmds) > 1 and grp not in extcmds[1:]):
     1324                            continue
    12331325                        cols.append(("%s %s" % (_("Group-Available:"), grp),
    12341326                                     str(data[2][grp])))
     
    12671359
    12681360    def getUsage(self):
    1269         return "[info|list|summary|redo|undo|new]"
     1361        return "[info|list|packages-list|summary|addon-info|redo|undo|rollback|new]"
    12701362
    12711363    def getSummary(self):
     
    12921384            return 2, ["Undoing transaction %u" % (old.tid,)]
    12931385
     1386    def _hcmd_rollback(self, base, extcmds):
     1387        force = False
     1388        if len(extcmds) > 1 and extcmds[1] == 'force':
     1389            force = True
     1390            extcmds = extcmds[:]
     1391            extcmds.pop(0)
     1392
     1393        old = base._history_get_transaction(extcmds)
     1394        if old is None:
     1395            return 1, ['Failed history rollback, no transaction']
     1396        last = base.history.last()
     1397        if last is None:
     1398            return 1, ['Failed history rollback, no last?']
     1399        if old.tid == last.tid:
     1400            return 0, ['Rollback to current, nothing to do']
     1401
     1402        mobj = None
     1403        for tid in base.history.old(range(old.tid + 1, last.tid + 1)):
     1404            if not force and (tid.altered_lt_rpmdb or tid.altered_gt_rpmdb):
     1405                if tid.altered_lt_rpmdb:
     1406                    msg = "Transaction history is incomplete, before %u."
     1407                else:
     1408                    msg = "Transaction history is incomplete, after %u."
     1409                print msg % tid.tid
     1410                print " You can use 'history rollback force', to try anyway."
     1411                return 1, ['Failed history rollback, incomplete']
     1412
     1413            if mobj is None:
     1414                mobj = yum.history.YumMergedHistoryTransaction(tid)
     1415            else:
     1416                mobj.merge(tid)
     1417
     1418        tm = time.ctime(old.beg_timestamp)
     1419        print "Rollback to transaction %u, from %s" % (old.tid, tm)
     1420        print base.fmtKeyValFill("  Undoing the following transactions: ",
     1421                                 ", ".join((str(x) for x in mobj.tid)))
     1422        base.historyInfoCmdPkgsAltered(mobj)
     1423        if base.history_undo(mobj):
     1424            return 2, ["Rollback to transaction %u" % (old.tid,)]
     1425
    12941426    def _hcmd_new(self, base, extcmds):
    12951427        base.history._create_db_file()
    12961428
    12971429    def doCheck(self, base, basecmd, extcmds):
    1298         cmds = ('list', 'info', 'summary', 'repeat', 'redo', 'undo', 'new')
     1430        cmds = ('list', 'info', 'summary', 'repeat', 'redo', 'undo', 'new',
     1431                'rollback',
     1432                'addon', 'addon-info',
     1433                'pkg', 'pkgs', 'pkg-list', 'pkgs-list',
     1434                'package', 'package-list', 'packages', 'packages-list')
    12991435        if extcmds and extcmds[0] not in cmds:
    13001436            base.logger.critical(_('Invalid history sub-command, use: %s.'),
    13011437                                 ", ".join(cmds))
    13021438            raise cli.CliError
    1303         if extcmds and extcmds[0] in ('repeat', 'redo', 'undo', 'new'):
     1439        if extcmds and extcmds[0] in ('repeat', 'redo', 'undo', 'rollback', 'new'):
    13041440            checkRootUID(base)
    13051441            checkGPGKey(base)
     1442        elif not os.access(base.history._db_file, os.R_OK):
     1443            base.logger.critical(_("You don't have access to the history DB."))
     1444            raise cli.CliError
    13061445
    13071446    def doCommand(self, base, basecmd, extcmds):
     
    13171456        elif vcmd == 'summary':
    13181457            ret = base.historySummaryCmd(extcmds)
     1458        elif vcmd in ('addon', 'addon-info'):
     1459            ret = base.historyAddonInfoCmd(extcmds)
     1460        elif vcmd in ('pkg', 'pkgs', 'pkg-list', 'pkgs-list',
     1461                      'package', 'package-list', 'packages', 'packages-list'):
     1462            ret = base.historyPackageListCmd(extcmds)
    13191463        elif vcmd == 'undo':
    13201464            ret = self._hcmd_undo(base, extcmds)
    13211465        elif vcmd in ('redo', 'repeat'):
    13221466            ret = self._hcmd_redo(base, extcmds)
     1467        elif vcmd == 'rollback':
     1468            ret = self._hcmd_rollback(base, extcmds)
    13231469        elif vcmd == 'new':
    13241470            ret = self._hcmd_new(base, extcmds)
     
    13321478        if extcmds:
    13331479            vcmd = extcmds[0]
    1334         return vcmd in ('repeat', 'redo', 'undo')
     1480        return vcmd in ('repeat', 'redo', 'undo', 'rollback')
    13351481
    13361482
     
    13481494        chkcmd = 'all'
    13491495        if extcmds:
    1350             chkcmd = extcmds[0]
     1496            chkcmd = extcmds
    13511497
    13521498        def _out(x):
    1353             print x
     1499            print to_unicode(x.__str__())
    13541500
    13551501        rc = 0
    1356         if base._rpmdb_warn_checks(_out, False, chkcmd):
     1502        if base._rpmdb_warn_checks(out=_out, warn=False, chkcmd=chkcmd,
     1503                                   header=lambda x: None):
    13571504            rc = 1
    13581505        return rc, ['%s %s' % (basecmd, chkcmd)]
     
    13611508        return False
    13621509
     1510class LoadTransactionCommand(YumCommand):
     1511    def getNames(self):
     1512        return ['load-transaction', 'load-ts']
     1513
     1514    def getUsage(self):
     1515        return "filename"
     1516
     1517    def getSummary(self):
     1518        return _("load a saved transaction from filename")
     1519
     1520    def doCommand(self, base, basecmd, extcmds):
     1521        if not extcmds:
     1522            base.logger.critical(_("No saved transaction file specified."))
     1523            raise cli.CliError
     1524       
     1525        load_file = extcmds[0]
     1526        self.doneCommand(base, _("loading transaction from %s") % load_file)
     1527       
     1528        try:
     1529            base.load_ts(load_file)
     1530        except yum.Errors.YumBaseError, e:
     1531            return 1, [to_unicode(e)]
     1532        return 2, [_('Transaction loaded from %s with %s members') % (load_file, len(base.tsInfo.getMembers()))]
     1533
     1534
     1535    def needTs(self, base, basecmd, extcmds):
     1536        return True
     1537
Note: See TracChangeset for help on using the changeset viewer.