Package proxy :: Package broker :: Module rhnRepository :: Class Repository
[hide private]
[frames] | no frames]

Class Repository

source code


Proxy local package repository lookup and manipulation code.

Instance Methods [hide private]
 
__init__(self, channelName, channelVersion, clientInfo, rhnParent=None, rhnParentXMLRPC=None, httpProxy=None, httpProxyUsername=None, httpProxyPassword=None, caChain=None) source code
 
getPackagePath(self, pkgFilename, redirect=0)
OVERLOADS getPackagePath in common/rhnRepository.
source code
 
getSourcePackagePath(self, pkgFilename)
OVERLOADS getSourcePackagePath in common/rhnRepository.
source code
 
_cacheObj(self, fileName, version, dataProducer, params=None)
The real workhorse for all flavors of listall It tries to pull data out of a file; if it doesn't work, it calls the data producer with the specified params to generate the data, which is also cached.
source code
 
_listPackages(self)
Generates a list of objects by calling the function
source code
 
__channelPackageMapping(self)
fetch package list on behalf of the client
source code

Inherited from spacewalk.common.rhnRepository.Repository: __del__, getPackage, getPackageHeader, getPackageSource, set_compress_headers

Inherited from spacewalk.common.rhnRepository.Repository (private): _getFile, _getHeaderFromFile

Inherited from spacewalk.common.RPC_Base.RPC_Base: get_function

Static Methods [hide private]
 
_getPkgListDir()
Creates and returns the directory for cached lists of packages.
source code

Inherited from spacewalk.common.rhnRepository.Repository: getPackagePathNVRA, i18n, media_1

Inherited from spacewalk.common.rhnRepository.Repository (private): _fileFeatures, _set_last_modified

Method Details [hide private]

__init__(self, channelName, channelVersion, clientInfo, rhnParent=None, rhnParentXMLRPC=None, httpProxy=None, httpProxyUsername=None, httpProxyPassword=None, caChain=None)
(Constructor)

source code 
Overrides: spacewalk.common.RPC_Base.RPC_Base.__init__

getPackagePath(self, pkgFilename, redirect=0)

source code 

OVERLOADS getPackagePath in common/rhnRepository. Returns complete path to an RPM file.

Overrides: spacewalk.common.rhnRepository.Repository.getPackagePath

getSourcePackagePath(self, pkgFilename)

source code 

OVERLOADS getSourcePackagePath in common/rhnRepository. snag src.rpm and nosrc.rpm from local repo, after ensuring we are authorized to fetch it.

Overrides: spacewalk.common.rhnRepository.Repository.getSourcePackagePath

_cacheObj(self, fileName, version, dataProducer, params=None)

source code 

The real workhorse for all flavors of listall It tries to pull data out of a file; if it doesn't work, it calls the data producer with the specified params to generate the data, which is also cached.

Returns a string from a cache file or, if the cache file is not there, calls dataProducer to generate the object and caches the results

_getPkgListDir()
Static Method

source code 

Creates and returns the directory for cached lists of packages. Used by _cacheObj.

XXX: Problem exists here. If PKG_LIST_DIR can't be created due to ownership... this is bad... need to fix.