Package rpmUtils :: Module updates :: Class Updates
[hide private]
[frames] | no frames]

Class Updates

source code

This class computes and keeps track of updates and obsoletes. initialize, add installed packages, add available packages (both as unique lists of name, arch, ver, rel, epoch tuples), add an optional dict of obsoleting packages with obsoletes and what they obsolete ie:

   foo, i386, 0, 1.1, 1: bar >= 1.1.
Instance Methods [hide private]
 
__init__(self, instlist, availlist) source code
 
_delFromDict(self, dict_, keys, value) source code
 
_delFromNADict(self, dict_, pkgtup) source code
 
delPackage(self, pkgtup)
remove available pkgtup that is no longer available
source code
 
debugprint(self, msg) source code
 
makeNADict(self, pkglist, Nonelists)
return lists of (e,v,r) tuples as value of a dict keyed on (n, a) optionally will return a (n, None) entry with all the a for that n in tuples of (a,e,v,r)
source code
 
returnNewest(self, evrlist)
takes a list of (e, v, r) tuples and returns the newest one
source code
 
returnHighestVerFromAllArchsByName(self, name, archlist, pkglist)
returns a list of package tuples in a list (n, a, e, v, r) takes a package name, a list of archs, and a list of pkgs in (n, a, e, v, r) form.
source code
 
condenseUpdates(self)
remove any accidental duplicates in updates
source code
 
checkForObsolete(self, pkglist, newest=1)
accept a list of packages to check to see if anything obsoletes them return an obsoleted_dict in the format of makeObsoletedDict
source code
 
doObsoletes(self)
figures out what things available obsolete things installed, returns them in a dict attribute of the class.
source code
 
makeObsoletedDict(self)
creates a dict of obsoleted packages -> [obsoleting package], this is to make it easier to look up what package obsoletes what item in the rpmdb
source code
 
doUpdates(self)
check for key lists as populated then commit acts of evil to determine what is updated and/or obsoleted, populate self.updatesdict
source code
 
makeUpdatingDict(self)
creates a dict of available packages -> [installed package], this is to make it easier to look up what package will be updating what in the rpmdb
source code
 
reduceListByNameArch(self, pkglist, name=None, arch=None)
returns a set of pkg naevr tuples reduced based on name or arch
source code
 
getUpdatesTuples(self, name=None, arch=None)
returns updates for packages in a list of tuples of: (updating naevr, installed naevr)
source code
 
getUpdatesList(self, name=None, arch=None)
returns updating packages in a list of (naevr) tuples
source code
 
getObsoletesTuples(self, newest=0, name=None, arch=None)
returns obsoletes for packages in a list of tuples of: (obsoleting naevr, installed naevr).
source code
 
getObsoletersTuples(self, newest=0, name=None, arch=None)
returns obsoletes for packages in a list of tuples of: (obsoleting naevr, installed naevr).
source code
 
getObsoletesList(self, newest=0, name=None, arch=None)
returns obsoleting packages in a list of naevr tuples of just the packages that obsolete something that is installed.
source code
 
getObsoletedList(self, newest=0, name=None)
returns a list of pkgtuples obsoleting the package in name
source code
 
getOthersList(self, name=None, arch=None)
returns a naevr tuple of the packages that are neither installed nor an update - this may include something that obsoletes an installed package
source code
 
_reduceListNewestByNameArch(self, tuplelist)
return list of newest packages based on name, arch matching this means(in name.arch form): foo.i386 and foo.noarch are not compared to each other for highest version only foo.i386 and foo.i386 will be compared
source code
Method Details [hide private]

getObsoletesTuples(self, newest=0, name=None, arch=None)

source code 

returns obsoletes for packages in a list of tuples of: (obsoleting naevr, installed naevr). You can specify name and/or arch of the installed package to narrow the results. You can also specify newest=1 to get the set of newest pkgs (name, arch) sorted, that obsolete something

getObsoletersTuples(self, newest=0, name=None, arch=None)

source code 

returns obsoletes for packages in a list of tuples of: (obsoleting naevr, installed naevr). You can specify name and/or arch of the obsoleting package to narrow the results. You can also specify newest=1 to get the set of newest pkgs (name, arch) sorted, that obsolete something

getObsoletesList(self, newest=0, name=None, arch=None)

source code 

returns obsoleting packages in a list of naevr tuples of just the packages that obsolete something that is installed. You can specify name and/or arch of the obsoleting packaging to narrow the results. You can also specify newest=1 to get the set of newest pkgs (name, arch) sorted, that obsolete something