Classes and functions dealing with rpm package representations.
Compare two Package or PackageEVR objects.
Compare two Package or PackageEVR objects for equality.
take a list of pkg objects and return a dict the contains all the possible naming conventions for them eg: for (name,i386,0,1,1) dict[name] = (name, i386, 0, 1, 1) dict[name.i386] = (name, i386, 0, 1, 1) dict[name-1-1.i386] = (name, i386, 0, 1, 1) dict[name-1] = (name, i386, 0, 1, 1) dict[name-1-1] = (name, i386, 0, 1, 1) dict[0:name-1-1.i386] = (name, i386, 0, 1, 1) dict[name-0:1-1.i386] = (name, i386, 0, 1, 1)
matches up the user request versus a pkg list: for installs/updates available pkgs should be the ‘others list’ for removes it should be the installed list of pkgs takes an optional casematch option to determine if case should be matched exactly. Defaults to not matching.
Fake repository class for use in rpmsack package objects
Bases: object
Base Package Object - sets up the default storage dicts and the most common returns
returns a printable version string - including epoch, if it’s set
Compare package to another one, only rpm-version ordering.
Compare package to another one, only rpm-version equality.
Compare package to another one, only rpm-version inequality.
Bases: yum.packages.PackageObject
check the package checksum vs the localPkg return True if pkg is good, False if not
Bases: object
return functions and storage for rpm-specific data
returns 1 or 0 if the pkg contains the requested tuple/tuple range
Is calling pkg.returnFileEntries(primary_only=True) faster than using searchFiles().
returns true if the package has a the prco that satisfies the reqtuple range, assume false. Takes: prcotype, requested prco tuple
Returns list of obsoleters that obsolete this package. Note that we don’t do obsoleting loops. If limit is != 0, then we stop after finding that many.
check to see if the package object provides for the requirement passed, including searching filelists if the requirement is a file dep
return changelog entries
return list of files based on type, you can pass primary_only=True to limit to those files in the primary repodata
return list of types of files in the package, you can pass primary_only=True to limit to those files in the primary repodata
return list of provides, requires, conflicts or obsoletes
A comparable epoch, version, and release representation. Note that you almost certainly want to use pkg.verEQ() or pkg.verGT() etc. instead.
Bases: yum.packages.PackageObject, yum.packages.RpmBase
derived class for the packageobject and RpmBase packageobject yum uses this for dealing with packages in a repository
Returns the ‘default’ checksum
Returns the name of the last person to do a commit to the changelog.
Returns the time of the last commit to the changelog.
remove self from package sack
handles an mdCache package dictionary item to populate out the package information
return path to local cached Header file downloaded from package byte ranges
return path to local package (whether it is present there, or not)
convert the prco tuples into a nicer human string
returns a printable version string - including epoch, if it’s set
returns a URL that can be used for downloading the package. Note that if you’re going to download the package in your tool, you should use self.repo.getPackage.
return a list of requires in normal rpm format
returns an rpm header object from the package object’s local header cache
check the package checksum vs the localPkg return True if pkg is good, False if not
Bases: yum.packages.YumAvailablePackage
Package object built from an rpm header
return list of files based on type
Has just a read() method, and keeps a count so we can find out how much has been read. Implemented so we can get the real size of the file from prelink.
Holder for each “problem” we find with a pkg.verify().
A holder for YUMVerifyPackageFile objects.
Bases: yum.packages.YumHeaderPackage
super class for dealing with packages in the rpmdb
verify that the installed files match the packaged checksum optionally verify they match only if they are in the ‘pattern’ list returns a tuple
Bases: yum.packages.YumHeaderPackage
Class to handle an arbitrary package from a file path this inherits most things from YumInstalledPackage because installed packages and an arbitrary package on disk act very much alike. init takes a ts instance and a filename/path to the package.
don’t bother “checking” the package matches itself.
Bases: yum.packages.YumLocalPackage
Class to handle an arbitrary package from a URL this inherits most things from YumLocalPackage, but will download a remote package to make it local. init takes a YumBase, a ts instance and a url to the package.