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:
|
|
|
|
|
|
|
delPackage(self,
pkgtup)
remove available pkgtup that is no longer available |
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
|
|