Classes for manipulating and querying groups of packages.
Bases: object
Base class that provides the interface for PackageSacks.
add a pkgobject to the packageSack
Add an “excluder” for all packages in the repo/sack. Can basically do anything based on nevra, changes lots of exclude decisions from “preload package; test; delPackage” into “load excluder”. Excluderid is used so the caller doesn’t have to track “have I loaded the excluder for this repo.”, it’s probably only useful when repoid is None ... if it turns out utterly worthless then it’s still not a huge wart.
builds the useful indexes for searching/querying the packageSack This should be called after all the necessary packages have been added/deleted
return if there are any packages in the sack that match the given NAEVR or the NAEVR of the given po
delete a pkgobject
exclude incompatible arches. archlist is a list of compatible arches
return dict { packages -> list of matching provides }
return dict { packages -> list of matching requires }
Is calling pkg.returnFileEntries(primary_only=True) faster than using searchFiles().
take a list strings and match the packages in the sack against it this will match against: name name.arch name-ver-rel.arch name-ver name-ver-rel epoch:name-ver-rel.arch name-epoch:ver-rel.arch
return [exact matches], [glob matches], [unmatch search terms]
return a list of package objects by (n,a,e,v,r) tuple
returns a list of package objects that are not required by any other package in this repository
return list of newest packages based on name matching this means(in name.arch form): foo.i386 and foo.noarch will be compared to each other for highest version.
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 Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them.
returns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]
return list of all packages
return list of package conflicting with the name (any evr and flag)
return list of packages by filename
return list of pkgobjects matching the nevra requested
return list of package obsoleting the name (any evr and flag)
return list of package objects matching the name, epoch, ver, rel, arch of the package object passed in
return list of pkgobject matching the (n,a,e,v,r) tuple
return list of package providing the name (any evr and flag)
return list of package requiring the name (any evr and flag)
returns a list of pkg tuples (n, a, e, v, r)
Return a simple version for all available packages.
Bases: yum.packageSack.PackageSackBase
Represents the aggregate of multiple package sacks, such that they can all be treated as one unified sack.
Add a pkgobject to the packageSack. This is a meaningless operation for the MetaSack.
Add an “excluder” for all packages in the repo/sack. Can basically do anything based on nevra, changes lots of exclude decisions from “preload package; test; delPackage” into “load excluder”. Excluderid is used so the caller doesn’t have to track “have I loaded the excluder for this repo.”, it’s probably only useful when repoid is None ... if it turns out utterly worthless then it’s still not a huge wart.
Adds a repository’s packageSack to this MetaSack.
builds the useful indexes for searching/querying the packageSack This should be called after all the necessary packages have been added/deleted
Delete a pkgobject if it exists in every sub-sack.
exclude incompatible arches. archlist is a list of compatible arches
return dict { packages -> list of matching provides }
return dict { packages -> list of matching requires }
return a list of package objects by (n,a,e,v,r) tuple
return list of newest packages based on name matching this means(in name.arch form): foo.i386 and foo.noarch will be compared to each other for highest version.
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. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them.
returns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]
Returns a list of packages. Note that the packages are always filtered to those matching the patterns/case. An optional repoid allows you to easily get data for a specific repo.
return list of package conflicting with the name (any evr and flag)
return list of packages by filename
return list of pkgobjects matching the nevra requested
return list of package obsoleting the name (any evr and flag)
return list of package providing the name (any evr and flag)
return list of package requiring the name (any evr and flag)
returns a list of pkg tuples (n, a, e, v, r)
Bases: yum.packageSack.PackageSackBase
represents sets (sacks) of Package Objects
add a pkgobject to the packageSack
builds the useful indexes for searching/querying the packageSack This should be called after all the necessary packages have been added/deleted
delete a pkgobject
Do nothing, mainly for the testing code.
exclude incompatible arches. archlist is a list of compatible arches
return dict { packages -> list of matching provides }
return dict { packages -> list of matching requires }
Is calling pkg.returnFileEntries(primary_only=True) faster than using searchFiles().
return list of newest packages based on name matching this means(in name.arch form): foo.i386 and foo.noarch will be compared to each other for highest version.
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 Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them.
returns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]
return list of all packages, takes optional repoid
return list of package conflicting with item requested
Return list of packages by filename.
return list of pkgobjects matching the names requested
return list of pkgobjects matching the nevra requested
return list of package obsoleting the item requested
return list of package providing the item requested
return list of package requiring the item requested
returns a list of pkg tuples (n, a, e, v, r) optionally from a single repoid
Does the same as PackageSack.returnNewestByName(). Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64
Does the same as PackageSack.returnNewestByNameArch() The last _two_ pkgs will be returned, not just one of them.
Bases: yum.packageSack.PackageSack
Derived class from PackageSack to build new Sack from list of pkgObjects - like one returned from self.returnNewestByNameArch() or self.returnNewestByName()