Package backend :: Package server :: Module rhnLib
[hide private]
[frames] | no frames]

Module rhnLib

source code

Classes [hide private]
  InvalidAction
An error class to signal when we can not handle an action
  EmptyAction
An error class that signals that we encountered an internal error trying to handle an action through no fault of the client
  ShadowAction
An error class for actions that should not get to the client
  CallableObj
Generic callable object
Functions [hide private]
 
computeSignature(*fields) source code
 
parseRPMFilename(pkgFilename)
IN: Package Name: xxx-yyy-ver.ver.ver-rel.rel_rel:e.ARCH.rpm (string) Understood rules: o Name can have nearly any char, but end in a - (well seperated by).
source code
 
normalize_server_arch(arch) source code
 
transpose_to_hash(arr, column_names)
Handy function to transpose an array from row-based to column-based, with named columns.
source code
 
get_package_path(nevra, org_id, source=0, prepend='', omit_epoch=None, package_type='rpm', checksum_type=None, checksum=None)
Computes a package path, optionally prepending a prefix The path will look like <prefix>/<org_id>/checksum[:3]/n/e:v-r/a/checksum/n-v-r.a.rpm if not omit_epoch <prefix>/<org_id>/checksum[:3]/n/v-r/a/checksum/n-v-r.a.rpm if omit_epoch
source code
 
get_package_path_without_package_name(nevra, org_id, prepend='', checksum_type=None, checksum=None)
return a package path without the package name appended
source code
 
make_evr(nvre, source=False)
IN: 'e:name-version-release' or 'name-version-release:e' OUT: {'name':name, 'version':version, 'release':release, 'epoch':epoch }
source code
 
_is_secure_path(path) source code
 
get_crash_path(org_id, system_id, crash)
For a given org_id, system_id and crash, return relative path to a crash directory.
source code
 
get_crashfile_path(org_id, system_id, crash, filename)
For a given org_id, system_id, crash and filename, return relative path to a crash file.
source code
 
get_action_path(org_id, system_id, action_id)
For a given org_id, system_id, and action_id, return relative path to a store directory.
source code
 
get_actionfile_path(org_id, system_id, action_id, filename)
For a given org_id, system_id, action_id, and file, return relative path to a file.
source code
Variables [hide private]
  __package__ = 'backend.server'
Function Details [hide private]

parseRPMFilename(pkgFilename)

source code 

IN: Package Name: xxx-yyy-ver.ver.ver-rel.rel_rel:e.ARCH.rpm (string)
Understood rules:
   o Name can have nearly any char, but end in a - (well seperated by).
     Any character; may include - as well.
   o Version cannot have a -, but ends in one.
   o Release should be an actual number, and can't have any -'s.
   o Release can include the Epoch, e.g.: 2:4 (4 is the epoch)
   o Epoch: Can include anything except a - and the : seperator???
     XXX: Is epoch info above correct?
OUT: [n,e,v,r, arch].