Module cli :: Class YumBaseCli
[hide private]
[frames] | no frames]

Class YumBaseCli

source code


This is the base class for yum cli. Inherits from yum.YumBase and output.YumOutput

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_checkMaybeYouMeant(self, arg, always_output=True)
If the update/remove argument doesn't match with case, or due to not being installed, tell the user.
source code
 
_installable(self, pkg, ematch=False)
check if the package is reasonably installable, true/false
source code
 
_makeUsage(self)
Format an attractive usage string for yum, listing subcommand names and summary usages.
source code
 
_maybeYouMeant(self, arg)
If install argument doesn't match with case, tell the user.
source code
 
_promptWanted(self) source code
 
cleanCli(self, userlist) source code
 
deplist(self, args)
cli wrapper method for findDeps method takes a list of packages and returns a formatted deplist for that package
source code
 
doCommands(self)
Calls the base command passes the extended commands/args out to be parsed (most notably package globs).
source code
 
doRepoSetup(self, thisrepo=None, dosack=1)
grabs the repomd.xml for each enabled repository and sets up the basics of the repository
source code
 
doShell(self)
do a shell-like interface for yum commands
source code
 
doTransaction(self)
takes care of package downloading, checking, user confirmation and actually RUNNING the transaction
source code
 
downgradePkgs(self, userlist)
Attempts to take the user specified list of packages/wildcards and downgrade them.
source code
 
erasePkgs(self, userlist)
take user commands and populate a transaction wrapper with packages to be erased/removed
source code
 
errorSummary(self, errstring)
parse the error string for 'interesting' errors which can be grouped, such as disk space issues
source code
 
getOptionsConfig(self, args)
parses command line arguments, takes cli args: sets up self.conf and self.cmds as well as logger objects in base instance
source code
 
gpgsigcheck(self, pkgs)
Perform GPG signature verification on the given packages, installing keys if possible
source code
 
installGroups(self, grouplist)
for each group requested do 'selectGroup' on them.
source code
 
installPkgs(self, userlist)
Attempts to take the user specified list of packages/wildcards and install them, or if they are installed, update them to a newer version.
source code
 
localInstall(self, filelist, updateonly=0)
handles installs/updates of rpms provided on the filesystem in a local dir (ie: not from a repo)
source code
 
parseCommands(self)
reads self.cmds and parses them out to make sure that the requested base command + argument makes any sense at all
source code
 
provides(self, args)
use the provides methods in the rpmdb and pkgsack to produce a list of items matching the provides strings.
source code
 
registerCommand(self, command) source code
 
reinstallPkgs(self, userlist)
Attempts to take the user specified list of packages/wildcards and reinstall them.
source code
 
removeGroups(self, grouplist)
Remove only packages of the named group(s).
source code
 
resolveDepCli(self, args)
returns a package (one per user arg) that provide the supplied arg
source code
 
returnGroupInfo(self, userlist)
returns complete information on a list of groups
source code
 
returnGroupLists(self, userlist) source code
 
returnPkgLists(self, extcmds, installed_available=False)
Returns packages lists based on arguments on the cli.returns a GenericHolder instance with the following lists defined: available = list of packageObjects installed = list of packageObjects updates = tuples of packageObjects (updating, installed) extras = list of packageObjects obsoletes = tuples of packageObjects (obsoleting, installed) recent = list of packageObjects
source code
 
search(self, args)
cli wrapper method for module search function, searches simple text tags in a package object
source code
 
shellUsage(self)
Print out the shell usage
source code
 
updatePkgs(self, userlist, quiet=0)
take user commands and populate transaction wrapper with packages to be updated
source code
 
usage(self)
Print out command line usage
source code

Inherited from yum.YumBase: __del__, add_enable_repo, bestPackagesFromList, buildTransaction, cleanExpireCache, cleanHeaders, cleanMetadata, cleanPackages, cleanRpmDB, cleanSqlite, cleanUsedHeadersPackages, close, closeRpmDB, costExcludePackages, deselectGroup, disablePlugins, doConfigSetup, doFileLogSetup, doGenericSetup, doGroupLists, doGroupSetup, doLock, doLoggingSetup, doPackageLists, doPluginSetup, doRpmDBSetup, doSackFilelistPopulate, doSackSetup, doUnlock, doUpdateSetup, downgrade, downgradeLocal, downloadHeader, downloadPkgs, excludePackages, findDeps, getInstalledPackageObject, getKeyForPackage, getKeyForRepo, getPackageObject, getReposFromConfig, getReposFromConfigFile, gpgKeyCheck, groupRemove, groupUnremove, history_redo, history_undo, includePackages, install, installLocal, processTransaction, readRepoConfig, reinstall, reinstallLocal, remove, returnInstalledPackagesByDep, returnPackageByDep, returnPackagesByDep, runTransaction, searchGenerator, searchPackageProvides, searchPackageTags, searchPackages, selectGroup, setCacheDir, sigCheckPkg, update, verifyChecksum, verifyHeader, verifyPkg, verifyTransaction, yumUtilsMsg

Inherited from yum.depsolve.Depsolve: allowedMultipleInstalls, cprof_resolveDeps, doTsSetup, initActionTs, isPackageInstalled, populateTs, prof_resolveDeps, resolveDeps, whatProvides

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from output.YumOutput: calcColumns, depListOutput, displayPkgsInGroups, download_callback_total_cb, failureReport, fmtColumns, fmtKeyValFill, fmtSection, format_number, historyInfoCmd, historyInfoCmdPkgsAltered, historyListCmd, historySummaryCmd, infoOutput, interrupt_callback, listPkgs, listTransaction, matchcallback, matchcallback_verbose, postTransactionOutput, printtime, reportDownloadSize, setupKeyImportCallbacks, setupProgessCallbacks, setupProgressCallbacks, simpleEnvraList, simpleList, simpleProgressBar, updatesObsoletesList, userconfirm

Static Methods [hide private]

Inherited from output.YumOutput: format_time

Properties [hide private]

Inherited from yum.YumBase: comps, conf, history, pkgSack, pkgtags, repos, rpmdb, ts, tsInfo, up

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: output.YumOutput.__init__

doCommands(self)

source code 

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

doRepoSetup(self, thisrepo=None, dosack=1)

source code 

grabs the repomd.xml for each enabled repository and sets up the basics of the repository

Overrides: yum.YumBase.doRepoSetup

downgradePkgs(self, userlist)

source code 

Attempts to take the user specified list of packages/wildcards and downgrade them. If a complete version number if specified, attempt to downgrade them to the specified version

gpgsigcheck(self, pkgs)

source code 

Perform GPG signature verification on the given packages, installing keys if possible

Returns non-zero if execution should stop (user abort). Will raise YumBaseError if there's a problem

installPkgs(self, userlist)

source code 

Attempts to take the user specified list of packages/wildcards and install them, or if they are installed, update them to a newer version. If a complete version number if specified, attempt to upgrade (or downgrade if they have been removed) them to the specified version

provides(self, args)

source code 

use the provides methods in the rpmdb and pkgsack to produce a list of items matching the provides strings. This is a cli wrapper to the module

removeGroups(self, grouplist)

source code 

Remove only packages of the named group(s). Do not recurse.

returnPkgLists(self, extcmds, installed_available=False)

source code 
Returns packages lists based on arguments on the cli.returns a 
GenericHolder instance with the following lists defined:
available = list of packageObjects
installed = list of packageObjects
updates = tuples of packageObjects (updating, installed)
extras = list of packageObjects
obsoletes = tuples of packageObjects (obsoleting, installed)
recent = list of packageObjects

installed_available = that the available package list is present
                      as .hidden_available when doing any of:
                      all/available/installed