yumcommands

Classes for subcommands of the yum command line interface.

yumcommands.checkRootUID(base)

Verify that the program is being run by the root user.

Parameters:base – a yum.Yumbase object.
Raises :cli.CliError
yumcommands.checkGPGKey(base)

Verify that there are gpg keys for the enabled repositories in the rpm database.

Parameters:base – a yum.Yumbase object.
Raises :cli.CliError
yumcommands.checkPackageArg(base, basecmd, extcmds)

Verify that extcmds contains the name of at least one package for basecmd to act on.

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
Raises :

cli.CliError

yumcommands.checkItemArg(base, basecmd, extcmds)

Verify that extcmds contains the name of at least one item for basecmd to act on. Generally, the items are command-line arguments that are not the name of a package, such as a file name passed to provides.

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
Raises :

cli.CliError

yumcommands.checkGroupArg(base, basecmd, extcmds)

Verify that extcmds contains the name of at least one group for basecmd to act on.

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
Raises :

cli.CliError

yumcommands.checkCleanArg(base, basecmd, extcmds)

Verify that extcmds contains at least one argument, and that all arguments in extcmds are valid options for clean.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
Raises :

cli.CliError

yumcommands.checkShellArg(base, basecmd, extcmds)

Verify that the arguments given to ‘yum shell’ are valid. yum shell can be given either no argument, or exactly one argument, which is the name of a file.

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
Raises :

cli.CliError

yumcommands.checkEnabledRepo(base, possible_local_files=[])

Verify that there is at least one enabled repo.

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
Raises :

cli.CliError:

YumCommand

class yumcommands.YumCommand

An abstract base class that defines the methods needed by the cli to execute a specific command. Subclasses must override at least getUsage() and getSummary().

doCheck(base, basecmd, extcmds)

Verify that various conditions are met so that the command can run.

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being checked for
  • extcmds – a list of arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute the command

Parameters:
  • base – a yum.Yumbase object.
  • basecmd – the name of the command being executed
  • extcmds – a list of arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
doneCommand(base, msg, *args)

Output msg the first time that this method is called, and do nothing on subsequent calls. This is to prevent duplicate messages from being printed for the same command.

Parameters:
  • base – a yum.Yumbase object
  • msg – the message to be output
  • *args

    additional arguments associated with the message

getNames()

Return a list of strings that are the names of the command. The command can be called from the command line by using any of these names.

Returns:a list containing the names of the command
getSummary()

Return a one line summary of what the command does.

Returns:a one line summary of what the command does
getUsage()

Return a usage string for the command, including arguments.

Returns:a usage string for the command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before the command can run

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

InstallCommand

class yumcommands.InstallCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the install command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that the program is being run by the root user, that there are enabled repositories with gpg keys, and that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

UpdateCommand

class yumcommands.UpdateCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the update command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that there are enabled repositories with gpg keys, and that this command is being run by the root user.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can by called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

DistroSyncCommand

class yumcommands.DistroSyncCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the distro-synch command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that the program is being run by the root user, and that there are enabled repositories with gpg keys.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

InfoCommand

class yumcommands.InfoCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the update command.

doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

ListCommand

class yumcommands.ListCommand

Bases: yumcommands.InfoCommand

A class containing methods needed by the cli to execute the list command.

getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command

EraseCommand

class yumcommands.EraseCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the erase command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that the program is being run by the root user, and that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

needTsRemove(base, basecmd, extcmds)

Return whether a transaction set for removal only must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a remove-only transaction set is needed, False otherwise

GroupsCommand

class yumcommands.GroupsCommand

Bases: yumcommands.YumCommand

Single sub-command interface for most groups interaction.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. The exact conditions checked will vary depending on the subcommand that is being called.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

needTsRemove(base, basecmd, extcmds)

Return whether a transaction set for removal only must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a remove-only transaction set is needed, False otherwise

MakeCacheCommand

class yumcommands.MakeCacheCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the makecache command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that there is an enabled repository.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

CleanCommand

class yumcommands.CleanCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the clean command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that there is at least one enabled repository, and that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

ProvidesCommand

class yumcommands.ProvidesCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the provides command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

CheckUpdateCommand

class yumcommands.CheckUpdateCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the update command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that there is at least one enabled repository.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

SearchCommand

class yumcommands.SearchCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the search command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

UpgradeCommand

class yumcommands.UpgradeCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the update command.

doCheck(base, basecmd, extcmds)
Verify that conditions are met so that this command can
run. These include that the program is being run by the root user, and that there are enabled repositories with gpg.
Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

LocalInstallCommand

class yumcommands.LocalInstallCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the localinstall command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that there are enabled repositories with gpg keys, and that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

ResolveDepCommand

class yumcommands.ResolveDepCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the resolvedep command.

doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

ShellCommand

class yumcommands.ShellCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the shell command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

DepListCommand

class yumcommands.DepListCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the deplist command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command

RepoListCommand

class yumcommands.RepoListCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the repolist command.

doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

HelpCommand

class yumcommands.HelpCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the help command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run; namely that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

ReInstallCommand

class yumcommands.ReInstallCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the reinstall command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that the program is being run by the root user, that there are enabled repositories with gpg keys, and that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

DowngradeCommand

class yumcommands.DowngradeCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the downgrade command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. These include that the program is being run by the root user, that there are enabled repositories with gpg keys, and that this command is called with appropriate arguments.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

VersionCommand

class yumcommands.VersionCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the version command.

doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

HistoryCommand

class yumcommands.HistoryCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the history command.

doCheck(base, basecmd, extcmds)

Verify that conditions are met so that this command can run. The exact conditions checked will vary depending on the subcommand that is being called.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

CheckRpmdbCommand

class yumcommands.CheckRpmdbCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the check-rpmdb command.

doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise

LoadTransactionCommand

class yumcommands.LoadTransactionCommand

Bases: yumcommands.YumCommand

A class containing methods needed by the cli to execute the load-transaction command.

doCommand(base, basecmd, extcmds)

Execute this command.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – the command line arguments passed to basecmd
Returns:

(exit_code, [ errors ])

exit_code is:

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
getNames()

Return a list containing the names of this command. This command can be called from the command line by using any of these names.

Returns:a list containing the names of this command
getSummary()

Return a one line summary of this command.

Returns:a one line summary of this command
getUsage()

Return a usage string for this command.

Returns:a usage string for this command
needTs(base, basecmd, extcmds)

Return whether a transaction set must be set up before this command can run.

Parameters:
  • base – a yum.Yumbase object
  • basecmd – the name of the command
  • extcmds – a list of arguments passed to basecmd
Returns:

True if a transaction set is needed, False otherwise