Package portage :: Module manifest :: Class Manifest
[hide private]

Class Manifest

source code

object --+
         |
        Manifest

Instance Methods [hide private]
 
__init__(self, pkgdir, distdir=None, fetchlist_dict=None, manifest1_compat=<type 'exceptions.DeprecationWarning'>, from_scratch=False, thin=False, allow_missing=False, allow_create=True, hashes=None, find_invalid_path_char=None)
Create new Manifest instance for package in pkgdir.
source code
 
getFullname(self)
Returns the absolute path to the Manifest file for this instance
source code
 
getDigests(self)
Compability function for old digest/manifest code, returns dict of filename:{hashfunction:hashvalue}
source code
 
getTypeDigests(self, ftype)
Similar to getDigests(), but restricted to files of the given type.
source code
 
_readManifest(self, file_path, myhashdict=None, **kwargs)
Parse a manifest.
source code
 
_read(self)
Parse Manifest file for this instance
source code
 
_parseManifestLines(self, mylines)
Parse manifest lines and return a list of manifest entries.
source code
 
_parseDigests(self, mylines, myhashdict=None, mytype=None)
Parse manifest entries and store the data in myhashdict.
source code
 
_getDigestData(self, distlist)
create a hash dict for a specific list of files
source code
 
_createManifestEntries(self) source code
 
checkIntegrity(self) source code
 
write(self, sign=False, force=False)
Write Manifest instance to disk, optionally signing it.
source code
 
sign(self)
Sign the Manifest
source code
 
validateSignature(self)
Validate signature on Manifest
source code
 
addFile(self, ftype, fname, hashdict=None, ignoreMissing=False)
Add entry to Manifest optionally using hashdict to avoid recalculation of hashes
source code
 
removeFile(self, ftype, fname)
Remove given entry from Manifest
source code
 
hasFile(self, ftype, fname)
Return whether the Manifest contains an entry for the given type,filename pair
source code
 
findFile(self, fname)
Return entrytype of the given file if present in Manifest or None if not present
source code
 
create(self, checkExisting=False, assumeDistHashesSometimes=False, assumeDistHashesAlways=False, requiredDistfiles=[])
Recreate this Manifest from scratch.
source code
 
_is_cpv(self, cat, pn, filename) source code
 
_update_thin_pkgdir(self, cat, pn, pkgdir) source code
 
_update_thick_pkgdir(self, cat, pn, pkgdir) source code
 
_pkgdir_category(self) source code
 
_getAbsname(self, ftype, fname) source code
 
checkAllHashes(self, ignoreMissingFiles=False) source code
 
checkTypeHashes(self, idtype, ignoreMissingFiles=False, hash_filter=None) source code
 
checkFileHashes(self, ftype, fname, ignoreMissing=False, hash_filter=None) source code
 
checkCpvHashes(self, cpv, checkDistfiles=True, onlyDistfiles=False, checkMiscfiles=False)
check the hashes for all files associated to the given cpv, include all AUX files and optionally all MISC files.
source code
 
_getCpvDistfiles(self, cpv)
Get a list of all DIST files associated to the given cpv
source code
 
getDistfilesSize(self, fetchlist) source code
 
updateFileHashes(self, ftype, fname, checkExisting=True, ignoreMissing=True, reuseExisting=False)
Regenerate hashes for the given file
source code
 
updateTypeHashes(self, idtype, checkExisting=False, ignoreMissingFiles=True)
Regenerate all hashes for all files of the given type
source code
 
updateAllHashes(self, checkExisting=False, ignoreMissingFiles=True)
Regenerate all hashes for all files in this Manifest.
source code
 
updateCpvHashes(self, cpv, ignoreMissingFiles=True)
Regenerate all hashes associated to the given cpv (includes all AUX and MISC files).
source code
 
updateHashesGuessType(self, fname, *args, **kwargs)
Regenerate hashes for the given file (guesses the type and then calls updateFileHashes).
source code
 
getFileData(self, ftype, fname, key)
Return the value of a specific (type,filename,key) triple, mainly useful to get the size for distfiles.
source code
 
getVersions(self)
Returns a list of manifest versions present in the manifest file.
source code
 
_catsplit(self, pkg_key)
Split a category and package, returning a list of [cat, pkg].
source code

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

Class Variables [hide private]
  parsers = parseManifest2,
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pkgdir, distdir=None, fetchlist_dict=None, manifest1_compat=<type 'exceptions.DeprecationWarning'>, from_scratch=False, thin=False, allow_missing=False, allow_create=True, hashes=None, find_invalid_path_char=None)
(Constructor)

source code 
Create new Manifest instance for package in pkgdir.
Do not parse Manifest file if from_scratch == True (only for internal use)
    The fetchlist_dict parameter is required only for generation of
    a Manifest (not needed for parsing and checking sums).
    If thin is specified, then the manifest carries only info for
    distfiles.

Overrides: object.__init__

_readManifest(self, file_path, myhashdict=None, **kwargs)

source code 

Parse a manifest. If myhashdict is given then data will be added too it. Otherwise, a new dict will be created and returned.

_parseDigests(self, mylines, myhashdict=None, mytype=None)

source code 

Parse manifest entries and store the data in myhashdict. If mytype is specified, it will override the type for all parsed entries.

write(self, sign=False, force=False)

source code 

Write Manifest instance to disk, optionally signing it. Returns True if the Manifest is actually written, and False if the write is skipped due to existing Manifest being identical.

create(self, checkExisting=False, assumeDistHashesSometimes=False, assumeDistHashesAlways=False, requiredDistfiles=[])

source code 

Recreate this Manifest from scratch. This will not use any existing checksums unless assumeDistHashesSometimes or assumeDistHashesAlways is true (assumeDistHashesSometimes will only cause DIST checksums to be reused if the file doesn't exist in DISTDIR). The requiredDistfiles parameter specifies a list of distfiles to raise a FileNotFound exception for (if no file or existing checksums are available), and defaults to all distfiles when not specified.

_catsplit(self, pkg_key)

source code 

Split a category and package, returning a list of [cat, pkg]. This is compatible with portage.catsplit()