Package bodhi :: Module util
[hide private]
[frames] | no frames]

Module util

source code

Random functions that don't fit elsewhere

Functions [hide private]
 
header(x)
%s...
source code
 
rpm_fileheader(pkgpath) source code
 
excluded_arch(rpmheader, arch)
Determine if an RPM should be excluded from a given architecture, either if it is explicitly marked as ExcludeArch, or if it is Exclusive to another
source code
 
sha1sum(file) source code
 
get_nvr(nvr)
Return the [ name, version, release ] a given name-ver-rel.
source code
 
mkmetadatadir(dir)
Generate package metadata for a given directory; if it doesn't exist, then create it.
source code
 
synchronized(lock)
Synchronization decorator
source code
 
fixEncoding(value, fallback='iso8859-15')
Convert value to a 'str' object encoded as UTF-8.
source code
 
displayname(identity)
Return the Full Name <email@address> of the current identity
source code
 
authorized_user(update, identity) source code
 
make_update_link(obj) source code
 
make_type_icon(update) source code
 
make_karma_icon(update) source code
 
get_age(date) source code
 
get_age_in_days(date) source code
 
flash_log(msg)
Flash and log a given message
source code
 
get_release_names() source code
 
get_release_tuples() source code
 
get_repo_tag(repo)
Pull the koji tag from the given mash repo
source code
 
get_pkg_people(pkgName, collectionName, collectionVersion)
Pull users who can commit and are watching a package Return two lists: * The first consists of usernames allowed to commit to the package.
source code
Variables [hide private]
  log = logging.getLogger(__name__)
Function Details [hide private]

header(x)

source code 
%s
     %s
%s

fixEncoding(value, fallback='iso8859-15')

source code 
Convert value to a 'str' object encoded as UTF-8. If value is not valid UTF-8 to begin with, assume it is encoded in the 'fallback' charset.

get_pkg_people(pkgName, collectionName, collectionVersion)

source code 
Pull users who can commit and are watching a package

Return two lists:
* The first consists of usernames allowed to commit to the package.
* The second are usernames watching the package for updates.

Note: The interface to the pkgdb could undergo the following changes:
  FAS2 related:
  * pkg['packageListings'][0]['owneruser'] =>
    pkg['packageListings'][0]['owner']
  * pkg['packageListings'][0]['people'][0..n]['user'] =>
    pkg['packageListings'][0]['people'][0..n]['userid']

* We may want to create a 'push' acl specifically for bodhi instead of
  reusing 'commit'.
* ['status']['translations'] may one day contain more than the 'C'
  translation.  The pkgdb will have to figure out how to deal with that
  if so.