rpmUtils.updates

Updates

class rpmUtils.updates.Updates(instlist, availlist)

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.
checkForObsolete(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

condenseUpdates()

remove any accidental duplicates in updates

delPackage(pkgtup)

remove available pkgtup that is no longer available

doObsoletes()

figures out what things available obsolete things installed, returns them in a dict attribute of the class.

doUpdates()

check for key lists as populated then commit acts of evil to determine what is updated and/or obsoleted, populate self.updatesdict

getObsoletedList(newest=0, name=None)

returns a list of pkgtuples obsoleting the package in name

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

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(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. 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

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

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

getOthersList(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

getUpdatesList(name=None, arch=None)

returns updating packages in a list of (naevr) tuples

getUpdatesTuples(name=None, arch=None)

returns updates for packages in a list of tuples of: (updating naevr, installed naevr)

makeNADict(pkglist, Nonelists, filter=None)

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)

makeObsoletedDict()

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

makeUpdatingDict()

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

reduceListByNameArch(pkglist, name=None, arch=None)

returns a set of pkg naevr tuples reduced based on name or arch

returnHighestVerFromAllArchsByName(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.

returnNewest(evrlist)

takes a list of (e, v, r) tuples and returns the newest one

Table Of Contents

Previous topic

rpmUtils.transaction

Next topic

shell

This Page