Assorted utility functions for yum.
|
share_data(value)
Take a value and use the same value from the store, if the value
isn't in the store this one becomes the shared version. |
source code
|
|
|
|
|
re_glob(s)
Tests if a string is a shell wildcard. |
source code
|
|
|
|
|
|
|
re_primary_dirname(dirname)
Tests if a dirname string, can be matched against just primary. |
source code
|
|
|
re_full_search_needed(s)
Tests if a string needs a full nevra match, instead of just name. |
source code
|
|
|
re_remote_url(s)
Tests if a string is a "remote" URL, http, https, ftp. |
source code
|
|
|
|
|
checksum(sumtype,
file,
CHUNK=65536,
datasize=None)
takes filename, hand back Checksum of it sumtype = md5 or
sha/sha1/sha256/sha512 (note sha == sha1) filename = /path/to/file
CHUNK=65536 by default |
source code
|
|
|
getFileList(path,
ext,
filelist)
Return all files in path matching ext, store them in filelist,
recurse dirs return list object |
source code
|
|
|
procgpgkey(rawkey)
Convert ASCII armoured GPG key to binary |
source code
|
|
|
|
|
keyIdToRPMVer(keyid)
Convert an integer representing a GPG key ID to the hex version
string used by RPM |
source code
|
|
|
keyInstalled(ts,
keyid,
timestamp)
Return if the GPG key described by the given keyid and timestamp are
installed in the rpmdb. |
source code
|
|
|
import_key_to_pubring(rawkey,
keyid,
cachedir=None,
gpgdir=None) |
source code
|
|
|
|
|
valid_detached_sig(sig_file,
signed_file,
gpghome=None)
takes signature , file that was signed and an optional gpghomedir |
source code
|
|
|
getCacheDir(tmpdir=' /var/tmp ' ,
reuse=True)
return a path to a valid and safe cachedir - only used when not
running as root or when --tempcache is set |
source code
|
|
|
sortPkgObj(pkg1,
pkg2)
sorts a list of yum package objects by name |
source code
|
|
|
newestInList(pkgs)
Return the newest in the list of packages. |
source code
|
|
|
|
|
prco_tuple_to_string(prcoTuple)
returns a text string of the prco from the tuple format |
source code
|
|
|
string_to_prco_tuple(prcoString)
returns a prco tuple (name, flags, (e, v, r)) for a string |
source code
|
|
|
refineSearchPattern(arg)
Takes a search string from the cli for Search or Provides and cleans
it up so it doesn't make us vomit |
source code
|
|
|
bunzipFile(source,
dest)
Extract the bzipped contents of source to dest. |
source code
|
|
|
get_running_kernel_pkgtup(ts)
This takes the output of uname and figures out the pkgtup of the
running kernel (name, arch, epoch, version, release). |
source code
|
|
|
get_running_kernel_version_release(ts)
This takes the output of uname and figures out the (version, release)
tuple for the running kernel. |
source code
|
|
|
find_unfinished_transactions(yumlibpath=' /var/lib/yum ' )
returns a list of the timestamps from the filenames of the unfinished
transactions remaining in the yumlibpath specified. |
source code
|
|
|
find_ts_remaining(timestamp,
yumlibpath=' /var/lib/yum ' )
this function takes the timestamp of the transaction to look at and
the path to the yum lib dir (defaults to /var/lib/yum) returns a list
of tuples(action, pkgspec) for the unfinished transaction elements. |
source code
|
|
|
seq_max_split(seq,
max_entries)
Given a seq, split into a list of lists of length max_entries each. |
source code
|
|
|
_ugly_utf8_string_hack(item)
hands back a unicoded string |
source code
|
|
|
|
|
|
|
|
|
setup_locale(override_codecs=True,
override_time=False) |
source code
|
|
|
|
|
return_running_pids()
return list of running processids, excluding this one |
source code
|
|
|
get_open_files(pid)
returns files open from this pid |
source code
|
|
|
|
|
|