yum.yumRepo

YumPackageSack

class yum.yumRepo.YumPackageSack(packageClass)

Bases: yum.packageSack.PackageSack

imports/handles package objects from an mdcache dict object

YumRepository

class yum.yumRepo.YumRepository(repoid)

Bases: yum.repos.Repository, yum.config.RepoConf

This is an actual repository object

Configuration attributes are pulled in from config.RepoConf.

check()

self-check the repo information - if we don’t have enough to move on then raise a repo error

checkMD(fn, mdtype, openchecksum=False)

check the metadata type against its checksum

dirSetup()

make the necessary dirs, if possible, raise on failure

disablePersistent()

Persistently disables this repository.

enablePersistent()

Persistently enables this repository.

getFileListsXML()

this gets you the path to the filelists.xml file, retrieving it if we need a new one

getGroupLocation()

Returns the location of the group.

getGroups()

gets groups and returns group file path for the repository, if there is none it returns None

getPackageSack()

Returns the instance of this repository’s package sack.

getPrimaryXML()

this gets you the path to the primary.xml file, retrieving it if we need a new one

metadataCurrent()

Check if there is a metadata_cookie and check its age. If the age of the cookie is less than metadata_expire time then return true else return False. This result is cached, so that metalink/repomd.xml are synchronized.

ready()

Returns true if this repository is setup and ready for use.

retrieveMD(mdtype)

base function to retrieve metadata files from the remote url returns the path to the local metadata file of a ‘mdtype’ mdtype can be ‘primary’, ‘filelists’, ‘other’ or ‘group’.

setMetadataCookie()

if possible, set touch the metadata_cookie file

verify(items=['repodata', 'comps'])

download/verify the specified items @items = [‘repodata’, ‘comps’] can include: repodata, comps, packages

withinCacheAge(myfile, expiration_time)

check if any file is older than a certain amount of time. Used for the cachecookie and the mirrorlist return True if w/i the expiration time limit false if the time limit has expired

Additionally compare the file to age of the newest .repo or yum.conf file. If any of them are newer then invalidate the cache

yum.yumRepo.getMirrorList(mirrorlist, pdict=None)

RepoVerifyProblem

class yum.yumRepo.RepoVerifyProblem(type, msg, details, fake=False)

Holder for each “problem” we find with a repo.verify().

Table Of Contents

Previous topic

yum.update_md

Next topic

yumcommands

This Page