Package yum :: Module packageSack :: Class PackageSackBase
[hide private]
[frames] | no frames]

Class PackageSackBase

source code


Base class that provides the interface for PackageSacks.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__len__(self) source code
 
__iter__(self) source code
 
__cmp__(self, other) source code
 
setCompatArchs(self, compatArchs) source code
 
populate(self, repo, mdtype, callback, cacheOnly) source code
 
packagesByTuple(self, pkgtup)
return a list of package objects by (n,a,e,v,r) tuple
source code
 
searchNevra(self, name=None, epoch=None, ver=None, rel=None, arch=None)
return list of pkgobjects matching the nevra requested
source code
 
searchNames(self, names=[]) source code
 
searchPO(self, po)
return list of package objects matching the name, epoch, ver, rel, arch of the package object passed in
source code
 
searchPkgTuple(self, pkgtup)
return list of pkgobject matching the (n,a,e,v,r) tuple
source code
 
contains(self, name=None, arch=None, epoch=None, ver=None, rel=None, po=None)
return if there are any packages in the sack that match the given NAEVR or the NAEVR of the given po
source code
 
getProvides(self, name, flags=None, version=(None, None, None))
return dict { packages -> list of matching provides }
source code
 
getRequires(self, name, flags=None, version=(None, None, None))
return dict { packages -> list of matching requires }
source code
 
searchRequires(self, name)
return list of package requiring the name (any evr and flag)
source code
 
searchProvides(self, name)
return list of package providing the name (any evr and flag)
source code
 
searchConflicts(self, name)
return list of package conflicting with the name (any evr and flag)
source code
 
searchObsoletes(self, name)
return list of package obsoleting the name (any evr and flag)
source code
 
returnObsoletes(self, newest=False)
returns a dict of obsoletes dict[obsoleting pkgtuple] = [list of obs]
source code
 
searchFiles(self, name)
return list of packages by filename
source code
 
addPackage(self, obj)
add a pkgobject to the packageSack
source code
 
buildIndexes(self)
builds the useful indexes for searching/querying the packageSack This should be called after all the necessary packages have been added/deleted
source code
 
delPackage(self, obj)
delete a pkgobject
source code
 
returnPackages(self, repoid=None, patterns=None, ignore_case=False)
return list of all packages
source code
 
addPackageExcluder(self, repoid, excluderid, excluder, *args)
Add an "excluder" for all packages in the repo/sack.
source code
 
simpleVersion(self, main_only=False, groups={})
Return a simple version for all available packages.
source code
 
returnNewestByNameArch(self, naTup=None, patterns=None, ignore_case=False)
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
 
returnNewestByName(self, name=None, patterns=None, ignore_case=False)
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.
source code
 
simplePkgList(self, patterns=None, ignore_case=False)
returns a list of pkg tuples (n, a, e, v, r)
source code
 
printPackages(self) source code
 
excludeArchs(self, archlist)
exclude incompatible arches.
source code
 
searchPackages(self, fields, criteria_re, callback) source code
 
searchAll(self, arg, query_type) source code
 
matchPackageNames(self, pkgspecs)
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
source code
 
returnLeafNodes(self, repoid=None)
returns a list of package objects that are not required by any other package in this repository
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

addPackageExcluder(self, repoid, excluderid, excluder, *args)

source code 

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.

returnNewestByName(self, name=None, patterns=None, ignore_case=False)

source code 

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

excludeArchs(self, archlist)

source code 

exclude incompatible arches. archlist is a list of compatible arches

matchPackageNames(self, pkgspecs)

source code 

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]