Module output :: Class YumOutput
[hide private]
[frames] | no frames]

Class YumOutput

source code


Main output class for the yum command line.

Instance Methods [hide private]
 
__init__(self) source code
 
printtime(self) source code
 
failureReport(self, errobj)
failure output for failovers from urlgrabber
source code
 
simpleProgressBar(self, current, total, name=None) source code
 
_highlight(self, highlight) source code
 
_sub_highlight(self, haystack, highlight, needles, **kwds) source code
 
calcColumns(self, data, columns=None, remainder_column=0, total_width=None, indent='')
Dynamically calculate the width of the fields in the data, data is of the format [column-number][field_length] = rows.
source code
 
_col_data(self, col_data) source code
 
fmtColumns(self, columns, msg=u'', end=u'')
Return a string for columns of data, which can overflow.
source code
 
simpleList(self, pkg, ui_overflow=False, indent='', highlight=False, columns=None)
Simple to use function to print a pkg as a line.
source code
 
simpleEnvraList(self, pkg, ui_overflow=False, indent='', highlight=False, columns=None)
Simple to use function to print a pkg as a line, with the pkg itself in envra format so it can be pased to list/install/etc.
source code
 
fmtKeyValFill(self, key, val)
Return a key value pair in the common two column output format.
source code
 
fmtSection(self, name, fill='=') source code
 
_enc(self, s)
Get the translated version from specspo and ensure that it's actually encoded in UTF-8.
source code
 
infoOutput(self, pkg, highlight=False) source code
 
updatesObsoletesList(self, uotup, changetype, columns=None)
takes an updates or obsoletes tuple of pkgobjects and returns a simple printed string of the output and a string explaining the relationship between the tuple members
source code
 
listPkgs(self, lst, description, outputType, highlight_na={}, columns=None, highlight_modes={})
outputs based on whatever outputType is.
source code
 
userconfirm(self)
gets a yes or no from the user, defaults to No
source code
 
_cli_confirm_gpg_key_import(self, keydict) source code
 
_group_names2aipkgs(self, pkg_names)
Convert pkg_names to installed pkgs or available pkgs, return value is a dict on pkg.name returning (apkg, ipkg).
source code
 
_calcDataPkgColumns(self, data, pkg_names, pkg_names2pkgs, indent=' ') source code
 
_displayPkgsFromNames(self, pkg_names, verbose, pkg_names2pkgs, indent=' ', columns=None) source code
 
displayPkgsInGroups(self, group) source code
 
depListOutput(self, results)
take a list of findDeps results and 'pretty print' the output
source code
 
format_number(self, number, SI=0, space=' ')
Turn numbers into human-readable metric-like numbers
source code
 
matchcallback(self, po, values, matchfor=None, verbose=None, highlight=None)
Output search/provides type callback matches.
source code
 
matchcallback_verbose(self, po, values, matchfor=None) source code
 
reportDownloadSize(self, packages, installonly=False)
Report the total download size for a set of packages
source code
 
listTransaction(self)
returns a string rep of the transaction in an easy-to-read way.
source code
 
postTransactionOutput(self) source code
 
setupProgressCallbacks(self)
sets up the progress callbacks and various output bars based on debug level
source code
 
setupProgessCallbacks(self) source code
 
setupKeyImportCallbacks(self) source code
 
interrupt_callback(self, cbobj)
Handle CTRL-C's during downloads
source code
 
download_callback_total_cb(self, remote_pkgs, remote_size, download_start_timestamp) source code
 
_history_uiactions(self, hpkgs) source code
 
_pwd_ui_username(self, uid, limit=None) source code
 
_history_list_transactions(self, extcmds) source code
 
historyListCmd(self, extcmds)
Shows the user a list of data about the history.
source code
 
_history_get_transactions(self, extcmds) source code
 
_history_get_transaction(self, extcmds) source code
 
historyInfoCmd(self, extcmds) source code
 
_historyInfoCmd(self, old, pats=[]) source code
 
historyInfoCmdPkgsAltered(self, old, pats=[]) source code
 
historySummaryCmd(self, extcmds) source code
Static Methods [hide private]
 
_calc_columns_spaces_helps(current, data_tups, left)
Spaces left on the current field will help how many pkgs?
source code
 
_fmt_column_align_width(width) source code
 
format_time(seconds, use_hours=0) source code
Method Details [hide private]

listPkgs(self, lst, description, outputType, highlight_na={}, columns=None, highlight_modes={})

source code 

outputs based on whatever outputType is. Current options: 'list' - simple pkg list 'info' - similar to rpm -qi output ...also highlight_na can be passed, and we'll highlight pkgs with (names, arch) in that set.

matchcallback(self, po, values, matchfor=None, verbose=None, highlight=None)

source code 

Output search/provides type callback matches. po is the pkg object, values are the things in the po that we've matched. If matchfor is passed, all the strings in that list will be highlighted within the output. verbose overrides logginglevel, if passed.

interrupt_callback(self, cbobj)

source code 

Handle CTRL-C's during downloads

If a CTRL-C occurs a URLGrabError will be raised to push the download onto the next mirror.

If two CTRL-C's occur in quick succession then yum will exit.

Parameters:
  • cbobj - urlgrabber callback obj