shell

A shell implementation for the yum command line interface.

YumShell

class shell.YumShell(base)

Bases: cmd.Cmd

A class to implement an interactive yum shell.

cmdloop(*args, **kwargs)

Sick hack for readline.

completenames(text, line, begidx, endidx)

Return a list of possible completions of a command.

Parameters:text – the command to be completed
Returns:a list of possible completions of the command
default(line)

Handle the next line of input if there is not a dedicated method of YumShell to handle it. This method will handle yum commands that are not unique to the shell, such as install, erase, etc.

Parameters:line – the next line of input
do_EOF(line)

Exit the shell when EOF is reached.

Parameters:line – unused
do_config(line)

Configure yum shell options.

Parameters:line – the remainder of the line, containing an option, and then optionally a value in the form [option] [value]. Valid options are one of the following: debuglevel, errorlevel, obsoletes, gpgcheck, assumeyes, exclude. If no value is given, print the current value. If a value is supplied, set the option to the given value.
do_exit(line)

Exit the shell.

Parameters:line – unused
do_help(arg)

Output help information.

Parameters:arg – the command to ouput help information about. If arg is an empty string, general help will be output.
do_quit(line)

Exit the shell.

Parameters:line – unused
do_repo(line)

Execute the given repo subcommand. The list subcommand lists repositories and their statuses, the enable subcommand enables the given repository, and the disable subcommand disables the given repository.

Parameters:line – the remainder of the line, containing the name of a subcommand and other parameters if required. If no subcommand is given, run the list subcommand.
do_repository(line)

Handle the repository alias of the do_repo() method.

Parameters:line – the remainder of the line, containing the name of a subcommand.
do_run(line)

Run the transaction.

Parameters:line – unused
do_transaction(line)

Execute the given transaction subcommand. The list subcommand outputs the contents of the transaction, the reset subcommand clears the transaction, the solve subcommand solves dependencies for the transaction, and the run subcommand executes the transaction.

Parameters:line – the remainder of the line, containing the name of a subcommand. If no subcommand is given, run the list subcommand.
do_ts(line)

Handle the ts alias of the do_transaction() method.

Parameters:line – the remainder of the line, containing the name of a subcommand. If no subcommand is given, run the list subcommand.
emptyline()

Do nothing on an empty line of input.

script()

Execute a script file in the yum shell. The location of the script file is supplied by the cli.YumBaseCli object that is passed as a parameter to the YumShell object when it is created.

Table Of Contents

Previous topic

rpmUtils.updates

Next topic

complexremovetests

This Page