Handle actual output from the cli.
Bases: urlgrabber.progress.TextMeter
A class to display text progress bar output.
Update the status of the text progress bar
Parameters: |
|
---|
A class to provide some terminal “UI” helpers based on curses.
Reinitializes the YumTerm.
Parameters: |
|
---|
Search the string haystack for all occurrences of any string in the list needles. Prefix each occurrence with beg, and postfix each occurrence with end, then return the modified string. For example:
>>> yt = YumTerm()
>>> yt.sub('spam and eggs', 'x', 'z', ['and'])
'spam xandz eggs'
This is particularly useful for emphasizing certain words in output: for example, calling sub() with beg = MODE[‘bold’] and end = MODE[‘normal’] will return a string that when printed to the terminal will appear to be haystack with each occurrence of the strings in needles in bold face. Note, however, that the sub_mode(), sub_bold(), sub_fg(), and sub_bg() methods provide convenient ways to access this same emphasizing functionality.
Parameters: |
|
---|---|
Returns: | haystack with beg prefixing, and end postfixing, occurrences of the strings in needles |
Search the string haystack for all occurrences of any string in the list needles. Prefix each occurrence with self.BG_COLOR[color], and postfix each occurrence with self.MODE[‘normal’], then return the modified string. This will return a string that when printed to the terminal will appear to be haystack with each occurrence of the strings in needles highlighted in the given background color.
Parameters: |
|
---|---|
Returns: | haystack with self.BG_COLOR[color] prefixing, and self.MODE[‘normal’] postfixing, occurrences of the strings in needles |
Search the string haystack for all occurrences of any string in the list needles. Prefix each occurrence with self.MODE[‘bold’], and postfix each occurrence with self.MODE[‘normal’], then return the modified string. This will return a string that when printed to the terminal will appear to be haystack with each occurrence of the strings in needles in bold face.
Parameters: |
|
---|---|
Returns: | haystack with self.MODE[‘bold’] prefixing, and self.MODE[‘normal’] postfixing, occurrences of the strings in needles |
Search the string haystack for all occurrences of any string in the list needles. Prefix each occurrence with self.FG_COLOR[color], and postfix each occurrence with self.MODE[‘normal’], then return the modified string. This will return a string that when printed to the terminal will appear to be haystack with each occurrence of the strings in needles in the given color.
Parameters: |
|
---|---|
Returns: | haystack with self.FG_COLOR[color] prefixing, and self.MODE[‘normal’] postfixing, occurrences of the strings in needles |
Search the string haystack for all occurrences of any string in the list needles. Prefix each occurrence with self.MODE[mode], and postfix each occurrence with self.MODE[‘normal’], then return the modified string. This will return a string that when printed to the terminal will appear to be haystack with each occurrence of the strings in needles in the given mode.
Parameters: |
|
---|---|
Returns: | haystack with self.MODE[mode] prefixing, and self.MODE[‘normal’] postfixing, occurrences of the strings in needles |
Search the string haystack for all occurrences of any string in the list needles. Prefix each occurrence with beg, and postfix each occurrence with self.MODE[‘normal’], then return the modified string. If beg is an ANSI escape code, such as given by self.MODE[‘bold’], this method will return haystack with the formatting given by the code only applied to the strings in needles.
Parameters: |
|
---|---|
Returns: | haystack with beg prefixing, and self.MODE[‘normal’] postfixing, occurrences of the strings in needles |
Main output class for the yum command line.
Dynamically calculate the widths of the columns that the fields in data should be placed into for output.
Parameters: |
|
---|---|
Returns: | a list of the widths of the columns that the fields in data should be placed into for output |
Format and output a list of findDeps results
Parameters: | results – a list of package dependency information as returned by findDeps |
---|
Output information about the packages in a given group
Parameters: | group – a Group object to output information about |
---|
Outputs summary information about the download process.
Parameters: |
|
---|
Perform failure output for failovers from urlgrabber
Parameters: | errobj – urlgrabber.grabber.CallbackObject containing information about the error |
---|---|
Raises : | errobj.exception |
Return a row of data formatted into a string for output. Items can overflow their columns.
Parameters: |
|
---|---|
Returns: | a row of data formatted into a string for output |
Return a key value pair in the common two column output format.
Parameters: |
|
---|---|
Returns: | the key value pair formatted in two columns for output |
Format and return a section header. The format of the header is a line with name centred, and fill repeated on either side to fill an entire line on the terminal.
Parameters: |
|
---|---|
Returns: | a string formatted to be a section header |
Return a human-readable metric-like string representation of a number.
Parameters: |
|
---|---|
Returns: | a human-readable metric-like string representation of number |
Return a human-readable string representation of a number of seconds. The string will show seconds, minutes, and optionally hours.
Parameters: |
|
---|---|
Returns: | a human-readable string representation of seconds |
Print addon information about transaction in history.
Parameters: | extcmds – list of extra command line arguments |
---|
Output information about a transaction in history
Parameters: | extcmds – list of extra command line arguments |
---|---|
Returns: | (exit_code, [errors]) |
exit_code is:
0 = we're done, exit
1 = we've errored, exit with error string
Print information about how packages are altered in a transaction.
Parameters: |
|
---|
Output a list of information about the history of yum transactions.
Parameters: | extcmds – list of extra command line arguments |
---|---|
Returns: | (exit_code, [errors]) |
exit_code is:
0 = we're done, exit
1 = we've errored, exit with error string
Print information about packages in history transactions.
Parameters: | extcmds – list of extra command line arguments |
---|
Print a list of information about transactions from history that involve the given package or packages.
Parameters: | extcmds – list of extra command line arguments |
---|
Print a summary of transactions in history.
Parameters: | extcmds – list of extra command line arguments |
---|
Print information about the given package.
Parameters: |
|
---|
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.grabber.CallbackObject |
---|
Prints information about the given list of packages.
Parameters: |
|
---|---|
Returns: | (exit_code, [errors]) |
exit_code is:
0 = we're done, exit
1 = we've errored, exit with error string
Return a string representation of the transaction in an easy-to-read format.
Output search/provides type callback matches.
Parameters: |
|
---|
Output search/provides type callback matches. This will output more information than matchcallback().
Parameters: |
|
---|
Returns a human-readable summary of the results of the transaction.
Returns: | a string containing a human-readable summary of the results of the transaction |
---|
Return a string representing the current time in the form:
Mon dd hh:mm:ss
Returns: | a string representing the current time |
---|
Report the total download size for a set of packages
Parameters: |
|
---|
Report the total size of packages being removed.
Parameters: | packages – a list of package objects |
---|
Set up callbacks to import and confirm gpg public keys.
This function is for API purposes only to protect the typo.
Set up the progress callbacks and various output bars based on debug level.
Print a package as a line, with the package itself in envra format so it can be passed to list/install/etc.
Parameters: |
|
---|
Print a package as a line.
Parameters: |
|
---|
Output the current status to the terminal using a simple status bar.
Parameters: |
|
---|
Print a simple string that explains the relationship between the members of an update or obsoletes tuple.
Parameters: |
|
---|
Get a yes or no from the user, and default to No
Returns: | True if the user selects yes, and False if the user selects no |
---|
A class to provide text output callback functions for Dependency Solver callback.
Output a message stating that the header for the given package is being downloaded.
Parameters: | name – the name of the package |
---|
Output a message stating that dependency resolution has finished.
Return an error message stating that a package required to fulfill a dependency is missing.
Parameters: |
|
---|
Output a message stating that the given package will not be removed. This method is used during leaf-only group remove commands to indicate that the package will be kept.
Parameters: |
|
---|
Print information about a package being added to the transaction set.
Parameters: |
|
---|
Valid current values for mode are:
i = the package will be installed
u = the package will be an update
e = the package will be erased
r = the package will be reinstalled
d = the package will be a downgrade
o = the package will be obsoleting another package
ud = the package will be updated
od = the package will be obsoleted
Print a message stating that two packages in the transaction conflict.
Parameters: |
|
---|
Print a message stating that two packages in the transaction conflict.
Parameters: |
|
---|
Output a message stating that the package formatted_req is being processed as a dependency for the package name.
Parameters: |
|
---|
Output a message stating that the package formatted_req is being processed as a dependency for the package po.
Parameters: |
|
---|
Output a message stating that dependency resolution is restarting.
Perform setup at the beginning of the dependency solving process.
Output a message stating that the transaction set is being populated.
Output a message stating that a transaction check is beginning.
Output a message stating that there is an unresolved dependency.
Parameters: | msg – string giving information about the unresolved |
---|
dependency
A class to handle text output callbacks during metadata cache updates.
Output an errorlog message.
Parameters: |
|
---|
Output a file log message.
Parameters: |
|
---|
Output a log message.
Parameters: |
|
---|
Output the current status to the terminal using a progress status bar.
Parameters: |
|
---|
Bases: yum.rpmtrans.RPMBaseCallback
A Yum specific callback class for RPM operations.
Output information about an rpm operation. This may include a text progress bar.
Parameters: |
|
---|
Return more information on a simple pkgname, if possible.
Parameters: |
|
---|
Print messages originating from a package script.
Parameters: |
|
---|
Output the current status to the terminal using a simple text progress bar consisting of 50 # marks.
Parameters: |
|
---|