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

Module server_packages

source code

Classes [hide private]
  dbPackage
A small class that helps us represent things about a database package.
  Packages
Functions [hide private]
 
update_errata_cache(server_id)
Queue an update the the server's errata cache.
source code
 
processPackageKeyAssociations(header, checksum_type, checksum) source code
 
package_delta(list1, list2)
Compares list1 and list2 (each list is a tuple (n, v, r, e) returns two lists (install, remove) XXX upgrades and downgrades are simulated by a removal and an install
source code
 
_package_list_to_hash(package_list, package_registry)
Converts package_list into a hash keyed by name package_registry contains the canonical version of the package for instance, version 51 and 0051 are indentical, but that would break the list comparison in Python.
source code
 
_add_to_hash(hash, key, value) source code
Variables [hide private]
  UNCHANGED = 0
  ADDED = 1
  DELETED = 2
  UPDATED = 3
  __package__ = 'backend.server.rhnServer'
Function Details [hide private]

update_errata_cache(server_id)

source code 

Queue an update the the server's errata cache. This queues for Taskomatic instead of doing it in-line because updating many servers at once was problematic and lead to unresponsive Satellite and incorrectly reporting failed actions when they did not fail (see bz 1119460).

_package_list_to_hash(package_list, package_registry)

source code 

Converts package_list into a hash keyed by name package_registry contains the canonical version of the package for instance, version 51 and 0051 are indentical, but that would break the list comparison in Python. package_registry is storing representatives for each equivalence class (where the equivalence relationship is rpm's version comparison algorigthm Side effect: Modifies second argument!