Package entropy :: Package db :: Module sql :: Class EntropySQLRepository

Class EntropySQLRepository

source code


EntropySQLRepository partially implements a SQL based repository storage.

Nested Classes
  Schema

Inherited from skel.EntropyRepositoryBase: ModuleProxy

Instance Methods
 
__init__(self, db, read_only, skip_checks, indexing, xcache, temporary, name, direct=False, cache_policy=None)
EntropyRepositoryBase constructor.
source code
 
clearCache(self)
Reimplemented from EntropyRepositoryBase.
source code
 
setIndexing(self, indexing)
Enable or disable metadata indexing.
source code
 
close(self, safe=False)
Reimplemented from EntropyRepositoryBase.
source code
 
vacuum(self)
Reimplemented from EntropyRepositoryBase.
source code
 
commit(self, force=False, no_plugins=False)
Reimplemented from EntropyRepositoryBase.
source code
 
rollback(self)
Reimplemented from EntropyRepositoryBase.
source code
 
initializeRepository(self)
Reimplemented from EntropyRepositoryBase.
source code
 
handlePackage(self, pkg_data, revision=None, formattedContent=False)
Reimplemented from EntropyRepositoryBase.
source code
int
addPackage(self, pkg_data, revision=-1, package_id=None, formatted_content=False)
Reimplemented from EntropyRepositoryBase.
source code
 
removePackage(self, package_id, from_add_package=False)
Reimplemented from EntropyRepositoryBase.
source code
 
setInjected(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
setCreationDate(self, package_id, date)
Reimplemented from EntropyRepositoryBase.
source code
 
setDigest(self, package_id, digest)
Reimplemented from EntropyRepositoryBase.
source code
 
setSignatures(self, package_id, sha1, sha256, sha512, gpg=None)
Reimplemented from EntropyRepositoryBase.
source code
 
setDownloadURL(self, package_id, url)
Set download URL prefix for package.
source code
 
setCategory(self, package_id, category)
Reimplemented from EntropyRepositoryBase.
source code
 
setCategoryDescription(self, category, description_data)
Reimplemented from EntropyRepositoryBase.
source code
 
setName(self, package_id, name)
Reimplemented from EntropyRepositoryBase.
source code
 
setDependency(self, iddependency, dependency)
Reimplemented from EntropyRepositoryBase.
source code
 
setAtom(self, package_id, atom)
Reimplemented from EntropyRepositoryBase.
source code
 
setSlot(self, package_id, slot)
Reimplemented from EntropyRepositoryBase.
source code
 
setRevision(self, package_id, revision)
Reimplemented from EntropyRepositoryBase.
source code
 
removeDependencies(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
insertDependencies(self, package_id, depdata)
Reimplemented from EntropyRepositoryBase.
source code
 
removeConflicts(self, package_id)
Remove all the conflicts of package.
source code
 
insertConflicts(self, package_id, conflicts)
Insert dependency conflicts for package.
source code
 
insertContent(self, package_id, content, already_formatted=False)
Reimplemented from EntropyRepositoryBase.
source code
 
insertAutomergefiles(self, package_id, automerge_data)
Reimplemented from EntropyRepositoryBase.
source code
 
insertPreservedLibrary(self, library, elfclass, path, atom)
Reimplemented from EntropyRepositoryBase.
source code
 
removePreservedLibrary(self, library, elfclass, path)
Reimplemented from EntropyRepositoryBase.
source code
tuple
listAllPreservedLibraries(self)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrievePreservedLibraries(self, library, elfclass)
Reimplemented from EntropyRepositoryBase.
source code
 
insertBranchMigration(self, repository, from_branch, to_branch, post_migration_md5sum, post_upgrade_md5sum)
Reimplemented from EntropyRepositoryBase.
source code
 
setBranchMigrationPostUpgradeMd5sum(self, repository, from_branch, to_branch, post_upgrade_md5sum)
Reimplemented from EntropyRepositoryBase.
source code
 
insertSpmUid(self, package_id, spm_package_uid)
Reimplemented from EntropyRepositoryBase.
source code
 
removeTrashedUids(self, spm_package_uids)
Remove given Source Package Manager unique package identifiers from the "trashed" list.
source code
 
setTrashedUid(self, spm_package_uid)
Reimplemented from EntropyRepositoryBase.
source code
 
setSpmUid(self, package_id, spm_package_uid, branch=None)
Reimplemented from EntropyRepositoryBase.
source code
 
setContentSafety(self, package_id, content_safety)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
contentDiff(self, package_id, dbconn, dbconn_package_id, extended=False)
Reimplemented from EntropyRepositoryBase.
source code
 
clean(self)
Reimplemented from EntropyRepositoryBase.
source code
int
getFakeSpmUid(self)
Reimplemented from EntropyRepositoryBase.
source code
int
getApi(self)
Reimplemented from EntropyRepositoryBase.
source code
string or None
getDependency(self, iddependency)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
getPackageIds(self, atom)
Reimplemented from EntropyRepositoryBase.
source code
int
getPackageIdFromDownload(self, download_relative_path, endswith=False)
Reimplemented from EntropyRepositoryBase.
source code
tuple
getVersioningData(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple
getStrictData(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple
getStrictScopeData(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
getScopeData(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple
getBaseData(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string
retrieveRepositoryUpdatesDigest(self, repository)
Reimplemented from EntropyRepositoryBase.
source code
 
listAllTreeUpdatesActions(self, no_ids_repos=False)
Reimplemented from EntropyRepositoryBase.
source code
 
retrieveTreeUpdatesActions(self, repository)
Reimplemented from EntropyRepositoryBase.
source code
 
bumpTreeUpdatesActions(self, updates)
Reimplemented from EntropyRepositoryBase.
source code
 
removeTreeUpdatesActions(self, repository)
Reimplemented from EntropyRepositoryBase.
source code
 
insertTreeUpdatesActions(self, updates, repository)
Reimplemented from EntropyRepositoryBase.
source code
 
setRepositoryUpdatesDigest(self, repository, digest)
Reimplemented from EntropyRepositoryBase.
source code
 
addRepositoryUpdatesActions(self, repository, actions, branch)
Reimplemented from EntropyRepositoryBase.
source code
 
clearPackageSets(self)
Reimplemented from EntropyRepositoryBase.
source code
 
insertPackageSets(self, sets_data)
Reimplemented from EntropyRepositoryBase.
source code
dict
retrievePackageSets(self)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrievePackageSet(self, setname)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveAtom(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveBranch(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveTrigger(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveDownloadURL(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveDescription(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveHomepage(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
int
retrieveSpmUid(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
int or None
retrieveSize(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
int
retrieveOnDiskSize(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveDigest(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple
retrieveSignatures(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple
retrieveExtraDownload(self, package_id, down_type=None)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveName(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
retrieveKeySplit(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
retrieveKeySlot(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveKeySlotAggregated(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple
retrieveKeySlotTag(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveVersion(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
int or None
retrieveRevision(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveCreationDate(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
int or None
retrieveApi(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveUseflags(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveSpmPhases(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveSpmRepository(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
list
retrieveDesktopMime(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveProvidedMime(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple or dict
retrieveNeeded(self, package_id, extended=False, formatted=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveNeededLibraries(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveProvidedLibraries(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveConflicts(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveProvide(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveDependenciesList(self, package_id, exclude_deptypes=None, resolve_conditional_deps=True)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveBuildDependencies(self, package_id, extended=False, resolve_conditional_deps=True)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveRuntimeDependencies(self, package_id, extended=False, resolve_conditional_deps=True)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrievePostDependencies(self, package_id, extended=False, resolve_conditional_deps=True)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveManualDependencies(self, package_id, extended=False, resolve_conditional_deps=True)
Reimplemented from EntropyRepositoryBase.
source code
tuple or frozenset
retrieveDependencies(self, package_id, extended=False, deptype=None, exclude_deptypes=None, resolve_conditional_deps=True)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveKeywords(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string
retrieveProtect(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string
retrieveProtectMask(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
dict or frozenset
retrieveSources(self, package_id, extended=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset or dict
retrieveAutomergefiles(self, package_id, get_dict=False)
Reimplemented from EntropyRepositoryBase.
source code
dict or tuple or frozenset
retrieveContent(self, package_id, extended=False, formatted=False, insert_formatted=False, order_by=None)
Reimplemented from EntropyRepositoryBase.
source code
iterator
retrieveContentIter(self, package_id, order_by=None, reverse=False)
Reimplemented from EntropyRepositoryBase.
source code
dict
retrieveContentSafety(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
iterator
retrieveContentSafetyIter(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveChangelog(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveChangelogByKey(self, category, name)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveSlot(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveTag(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveMirrorData(self, mirrorname)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveCategory(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
dict
retrieveCategoryDescription(self, category)
Reimplemented from EntropyRepositoryBase.
source code
dict
retrieveLicenseData(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
retrieveLicenseDataKeys(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
string (raw format) or None
retrieveLicenseText(self, license_name)
Reimplemented from EntropyRepositoryBase.
source code
string or None
retrieveLicense(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
retrieveCompileFlags(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
tuple or frozenset
retrieveReverseDependencies(self, package_id, atoms=False, key_slot=False, exclude_deptypes=None, extended=False)
Reimplemented from EntropyRepositoryBase.
source code
tuple
retrieveUnusedPackageIds(self)
Reimplemented from EntropyRepositoryBase.
source code
bool
arePackageIdsAvailable(self, package_ids)
Reimplemented from EntropyRepositoryBase.
source code
bool
isPackageIdAvailable(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
bool or frozenset
isFileAvailable(self, path, get_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
resolveNeeded(self, needed, elfclass=-1, extended=False)
Reimplemented from EntropyRepositoryBase.
source code
bool
isSpmUidAvailable(self, spm_uid)
Reimplemented from EntropyRepositoryBase.
source code
bool
isSpmUidTrashed(self, spm_uid)
Reimplemented from EntropyRepositoryBase.
source code
bool
isLicenseDataKeyAvailable(self, license_name)
Reimplemented from EntropyRepositoryBase.
source code
bool
isLicenseAccepted(self, license_name)
Reimplemented from EntropyRepositoryBase.
source code
bool
isSystemPackage(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
bool
isInjected(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchBelongs(self, bfile, like=False)
Reimplemented from EntropyRepositoryBase.
source code
tuple
searchContentSafety(self, sfile)
Search content safety metadata (usually, sha256 and mtime) related to given file path.
source code
frozenset
searchTaggedPackages(self, tag, atoms=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchRevisionedPackages(self, revision)
Reimplemented from EntropyRepositoryBase.
source code
 
acceptLicense(self, license_name)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchLicense(self, keyword, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchSlotted(self, keyword, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchKeySlot(self, key, slot)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchKeySlotTag(self, key, slot, tag)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchNeeded(self, needed, elfclass=-1, like=False)
Reimplemented from EntropyRepositoryBase.
source code
 
searchConflict(self, conflict, strings=False)
Reimplemented from EntropyRepositoryBase.
source code
int or frozenset
searchDependency(self, dep, like=False, multi=False, strings=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchPackageIdFromDependencyId(self, dependency_id)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchSets(self, keyword)
Reimplemented from EntropyRepositoryBase.
source code
tuple
searchProvidedMime(self, mimetype)
Reimplemented from EntropyRepositoryBase.
source code
tuple
searchSimilarPackages(self, keyword, atom=False)
Reimplemented from EntropyRepositoryBase.
source code
tuple
searchPackages(self, keyword, sensitive=False, slot=None, tag=None, order_by=None, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
list
searchProvidedVirtualPackage(self, keyword)
Search in old-style Portage PROVIDE metadata.
source code
frozenset
searchDescription(self, keyword, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchUseflag(self, keyword, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchHomepage(self, keyword, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchName(self, keyword, sensitive=False, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchCategory(self, keyword, like=False, just_id=True)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
searchNameCategory(self, name, category, just_id=False)
Reimplemented from EntropyRepositoryBase.
source code
tuple
isPackageScopeAvailable(self, atom, slot, revision)
Reimplemented from EntropyRepositoryBase.
source code
tuple
isBranchMigrationAvailable(self, repository, from_branch, to_branch)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
listPackageIdsInCategory(self, category, order_by=None)
Reimplemented from EntropyRepositoryBase.
source code
tuple
listAllPackages(self, get_scope=False, order_by=None)
Reimplemented from EntropyRepositoryBase.
source code
tuple
listAllSpmUids(self)
Reimplemented from EntropyRepositoryBase.
source code
tuple
listAllTrashedSpmUids(self)
Reimplemented from EntropyRepositoryBase.
source code
tuple or frozenset
listAllPackageIds(self, order_by=None)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
listAllInjectedPackageIds(self)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
listAllSystemPackageIds(self)
Reimplemented from EntropyRepositoryBase.
source code
list
listAllDependencies(self)
Reimplemented from EntropyRepositoryBase.
source code
tuple or frozenset
listAllDownloads(self, do_sort=True, full_path=False)
Reimplemented from EntropyRepositoryBase.
source code
tuple or frozenset
listAllExtraDownloads(self, do_sort=True)
Reimplemented from EntropyRepositoryBase.
source code
int or tuple or frozenset
listAllFiles(self, clean=False, count=False)
Reimplemented from EntropyRepositoryBase.
source code
frozenset
listAllCategories(self, order_by=None)
Reimplemented from EntropyRepositoryBase.
source code
list
listConfigProtectEntries(self, mask=False)
Reimplemented from EntropyRepositoryBase.
source code
 
switchBranch(self, package_id, tobranch)
Reimplemented from EntropyRepositoryBase.
source code
string
getSetting(self, setting_name)
Reimplemented from EntropyRepositoryBase.
source code
 
integrity_check(self)
Not implemented, subclasses must implement this.
source code
 
validate(self)
Reimplemented from EntropyRepositoryBase.
source code
 
exportRepository(self, dumpfile)
Not implemented, subclasses must implement this.
source code
float
mtime(self)
Not implemented, subclasses must implement this.
source code
string
checksum(self, do_order=False, strict=True, include_signatures=False, include_dependencies=False)
Reimplemented from EntropyRepositoryBase.
source code
 
storeInstalledPackage(self, package_id, repoid, source=0)
Reimplemented from EntropySQLRepository.
source code
string or None
getInstalledPackageRepository(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
int or None
getInstalledPackageSource(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
setInstalledPackageSource(self, package_id, source)
Reimplemented from EntropyRepositoryBase.
source code
 
dropInstalledPackageFromStore(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
 
storeSpmMetadata(self, package_id, blob)
Reimplemented from EntropyRepositoryBase.
source code
buffer
retrieveSpmMetadata(self, package_id)
Reimplemented from EntropyRepositoryBase.
source code
dict
retrieveBranchMigration(self, to_branch)
Reimplemented from EntropyRepositoryBase.
source code
 
dropContent(self)
Reimplemented from EntropyRepositoryBase.
source code
 
dropContentSafety(self)
Reimplemented from EntropyRepositoryBase.
source code
 
dropChangelog(self)
Reimplemented from EntropyRepositoryBase.
source code
 
dropGpgSignatures(self)
Reimplemented from EntropyRepositoryBase.
source code
 
dropAllIndexes(self)
Not implemented, subclasses must implement this.
source code
 
createAllIndexes(self)
Reimplemented from EntropyRepositoryBase.
source code
 
regenerateSpmUidMapping(self)
Reimplemented from EntropyRepositoryBase.
source code
 
clearTreeupdatesEntries(self, repository)
Reimplemented from EntropyRepositoryBase.
source code
 
resetTreeupdatesDigests(self)
Reimplemented from EntropyRepositoryBase.
source code
 
moveSpmUidsToBranch(self, to_branch)
Reimplemented from EntropyRepositoryBase.
source code

Inherited from skel.EntropyRepositoryBase: acquire_exclusive, acquire_shared, alignDatabases, atomMatch, atomMatchCacheKey, cache_policy, cache_policy_all, cache_policy_none, caching, direct, directed, exclusive, filterTreeUpdatesActions, getPackageData, getPackageXmlData, getPackagesToRemove, getTriggerData, lock_path, maskFilter, readonly, release_exclusive, release_shared, repository_id, runTreeUpdatesActions, shared, temporary, try_acquire_exclusive, try_acquire_shared

Inherited from skel.EntropyRepositoryPluginStore: add_plugin, get_plugin_metadata, get_plugins, get_plugins_metadata, remove_plugin, set_plugin_metadata

Inherited from core.EntropyPluginStore: drop_plugins, has_plugin

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

Class Methods
 
isMainThread(cls, thread_obj) source code

Inherited from output.TextInterface: ask_question, edit_file, input_box, output, set_title

Static Methods
int
update(entropy_client, repository_id, force, gpg)
Reimplemented from EntropyRepositoryBase.
source code
int or None
revision(repository_id)
Reimplemented from EntropyRepositoryBase.
source code
int or None
remote_revision(repository_id)
Reimplemented from EntropyRepositoryBase.
source code
int
importRepository(dumpfile, db, data=None)
Not implemented, subclasses must implement this.
source code

Inherited from skel.EntropyRepositoryPluginStore: add_permanent_plugin, get_permanent_plugins, remove_permanent_plugin

Class Variables
  GENERIC_NAME = '__generic__'

Inherited from skel.EntropyRepositoryBase: REPOSITORY_ALREADY_UPTODATE, REPOSITORY_CHECKSUM_ERROR, REPOSITORY_GENERIC_ERROR, REPOSITORY_NOT_AVAILABLE, REPOSITORY_PERMISSION_DENIED_ERROR, REPOSITORY_UPDATED_OK, SETTING_KEYS, VIRTUAL_META_PACKAGE_CATEGORY

Inherited from output.TextInterface: OUTPUT_LOCK

Properties

Inherited from object: __class__

Method Details

__init__(self, db, read_only, skip_checks, indexing, xcache, temporary, name, direct=False, cache_policy=None)
(Constructor)

source code 

EntropyRepositoryBase constructor.

Parameters:
  • readonly - readonly bit
  • xcache - xcache bit (enable on-disk cache?)
  • temporary - is this repo a temporary (non persistent) one?
  • name - repository identifier (or name)
  • direct - True, if direct mode should be always enabled
Overrides: object.__init__
(inherited documentation)

clearCache(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.clearCache

update(entropy_client, repository_id, force, gpg)
Static Method

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • entropy_client - Entropy Client based object
  • repository_id - repository identifier
  • force - force update anyway
  • gpg - GPG feature enable
Returns: int
status code
Overrides: skel.EntropyRepositoryBase.update

revision(repository_id)
Static Method

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository_id - repository identifier
Returns: int or None
repository revision
Raises:
  • KeyError - if repository is not available
Overrides: skel.EntropyRepositoryBase.revision

remote_revision(repository_id)
Static Method

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository_id - repository identifier
Returns: int or None
repository revision
Raises:
  • KeyError - if repository is not available
Overrides: skel.EntropyRepositoryBase.remote_revision

setIndexing(self, indexing)

source code 

Enable or disable metadata indexing.

Parameters:
  • indexing (bool) - True, to enable indexing.

close(self, safe=False)

source code 

Reimplemented from EntropyRepositoryBase. Needs to call superclass method. This is a stub, please implement the SQL logic.

Parameters:
  • safe - if True, the MainThread resources won't be released. This is vital if both MainThread and a random thread access the Repository concurrently. With safe=False (original behaviour) MainThread cursors may become invalid and cause random exceptions in a racey fashion. But on the other hand, if closing all the resources is what is really wanted, safe must be False, or the MainThread ones will be never released.
Overrides: skel.EntropyRepositoryBase.close

vacuum(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.vacuum

commit(self, force=False, no_plugins=False)

source code 

Reimplemented from EntropyRepositoryBase. Needs to call superclass method.

Parameters:
  • force - force commit, despite read-only bit being set
  • no_plugins - disable EntropyRepository plugins execution
Overrides: skel.EntropyRepositoryBase.commit

rollback(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.rollback

initializeRepository(self)

source code 

Reimplemented from EntropyRepositoryBase. Needs to call superclass method. This is a stub, please implement the SQL logic.

Overrides: skel.EntropyRepositoryBase.initializeRepository

handlePackage(self, pkg_data, revision=None, formattedContent=False)

source code 

Reimplemented from EntropyRepositoryBase. Raises NotImplementedError. Subclasses have to reimplement this.

Raises:
  • NotImplementedError - guess what, you need to implement this.
Overrides: skel.EntropyRepositoryBase.handlePackage

addPackage(self, pkg_data, revision=-1, package_id=None, formatted_content=False)

source code 

Reimplemented from EntropyRepositoryBase. Needs to call superclass method.

Parameters:
  • pkg_data - Entropy package metadata
  • revision - force a specific Entropy package revision
  • package_id - add package to Entropy repository using the provided package identifier, this is very dangerous and could cause packages with the same identifier to be removed.
  • formatted_content - if True, determines whether the content metadata (usually the biggest part) in pkg_data is already prepared for insertion
Returns: int
new package identifier
Overrides: skel.EntropyRepositoryBase.addPackage

removePackage(self, package_id, from_add_package=False)

source code 

Reimplemented from EntropyRepositoryBase. Needs to call superclass method.

Parameters:
  • package_id - Entropy repository package indentifier
  • from_add_package - inform function that it's being called from inside addPackage().
Overrides: skel.EntropyRepositoryBase.removePackage

setInjected(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Overrides: skel.EntropyRepositoryBase.setInjected

setCreationDate(self, package_id, date)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • date - unix time in string form
Overrides: skel.EntropyRepositoryBase.setCreationDate

setDigest(self, package_id, digest)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • digest - md5 hash for package file
Overrides: skel.EntropyRepositoryBase.setDigest

setSignatures(self, package_id, sha1, sha256, sha512, gpg=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • sha1 - SHA1 hash for package file
  • sha256 - SHA256 hash for package file
  • sha512 - SHA512 hash for package file
  • gpg - GPG signature file content
Overrides: skel.EntropyRepositoryBase.setSignatures

setDownloadURL(self, package_id, url)

source code 

Set download URL prefix for package.

Parameters:
  • package_id (int) - package indentifier
  • url (string) - URL prefix to set
Overrides: skel.EntropyRepositoryBase.setDownloadURL

setCategory(self, package_id, category)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • category - category to set
Overrides: skel.EntropyRepositoryBase.setCategory

setCategoryDescription(self, category, description_data)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • category - category name
  • description_data - category description for several locales. {'en': "This is blah", 'it': "Questo e' blah", ... }
Overrides: skel.EntropyRepositoryBase.setCategoryDescription

setName(self, package_id, name)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • name - package name
Overrides: skel.EntropyRepositoryBase.setName

setDependency(self, iddependency, dependency)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • iddependency - dependency string identifier
  • dependency - dependency string
Overrides: skel.EntropyRepositoryBase.setDependency

setAtom(self, package_id, atom)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • atom - atom string
Overrides: skel.EntropyRepositoryBase.setAtom

setSlot(self, package_id, slot)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • slot - slot string
Overrides: skel.EntropyRepositoryBase.setSlot

setRevision(self, package_id, revision)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • revision - new revision
Overrides: skel.EntropyRepositoryBase.setRevision

removeDependencies(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Overrides: skel.EntropyRepositoryBase.removeDependencies

insertDependencies(self, package_id, depdata)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • depdata - dependency dictionary {'app-foo/foo': dep_type_integer, ...}
Overrides: skel.EntropyRepositoryBase.insertDependencies

removeConflicts(self, package_id)

source code 

Remove all the conflicts of package.

Parameters:
  • package_id (int) - package indentifier
Overrides: skel.EntropyRepositoryBase.removeConflicts

insertConflicts(self, package_id, conflicts)

source code 

Insert dependency conflicts for package.

Parameters:
  • package_id (int) - package indentifier
  • conflicts (list) - list of dep. conflicts
Overrides: skel.EntropyRepositoryBase.insertConflicts

insertContent(self, package_id, content, already_formatted=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • content - content metadata to insert. {'/path/to/foo': 'obj(content type)',} or [(package_id, path, type,) ...]
  • already_formatted - if True, "content" is expected to be already formatted for insertion, this means that "content" must be a list of tuples of length 3.
Overrides: skel.EntropyRepositoryBase.insertContent

insertAutomergefiles(self, package_id, automerge_data)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • automerge_data - list of tuples of length 2. [('/path/to/conf/file', 'md5_checksum_string',) ... ]
Overrides: skel.EntropyRepositoryBase.insertAutomergefiles

insertPreservedLibrary(self, library, elfclass, path, atom)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • library - the library name (SONAME)
  • elfclass - the ELF class of the library
  • path - the path where the library is currently stored
  • atom - the atom string of the package providing the library
Overrides: skel.EntropyRepositoryBase.insertPreservedLibrary

removePreservedLibrary(self, library, elfclass, path)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • library - the library name (SONAME)
  • elfclass - the ELF class of the library
  • path - the path where the library is currently stored
Overrides: skel.EntropyRepositoryBase.removePreservedLibrary

listAllPreservedLibraries(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: tuple
a list (tuple) of tuples composed by (library, elfclass, path, atom).
Overrides: skel.EntropyRepositoryBase.listAllPreservedLibraries

retrievePreservedLibraries(self, library, elfclass)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: frozenset
the list (tuple) of paths associated with a SONAME and its ELF class.
Overrides: skel.EntropyRepositoryBase.retrievePreservedLibraries

insertBranchMigration(self, repository, from_branch, to_branch, post_migration_md5sum, post_upgrade_md5sum)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
  • from_branch - original branch
  • to_branch - destination branch
  • post_migration_md5sum - md5 hash related to "post-migration" branch script file
  • post_upgrade_md5sum - md5 hash related to "post-upgrade on new branch" script file
Overrides: skel.EntropyRepositoryBase.insertBranchMigration

setBranchMigrationPostUpgradeMd5sum(self, repository, from_branch, to_branch, post_upgrade_md5sum)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
  • from_branch - original branch
  • to_branch - destination branch
  • post_upgrade_md5sum - md5 hash related to "post-upgrade on new branch" script file
Overrides: skel.EntropyRepositoryBase.setBranchMigrationPostUpgradeMd5sum

insertSpmUid(self, package_id, spm_package_uid)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • spm_package_uid - Source package Manager unique package identifier
Overrides: skel.EntropyRepositoryBase.insertSpmUid

removeTrashedUids(self, spm_package_uids)

source code 

Remove given Source Package Manager unique package identifiers from the "trashed" list. This is only used by Entropy Server.

Overrides: skel.EntropyRepositoryBase.removeTrashedUids

setTrashedUid(self, spm_package_uid)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • spm_package_uid - Source package Manager unique package identifier
Overrides: skel.EntropyRepositoryBase.setTrashedUid

setSpmUid(self, package_id, spm_package_uid, branch=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • spm_package_uid - Source package Manager unique package identifier
  • branch - current Entropy repository branch
Overrides: skel.EntropyRepositoryBase.setSpmUid

setContentSafety(self, package_id, content_safety)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • content_safety - dictionary with the same data structure of the one returned by retrieveContentSafety()
Overrides: skel.EntropyRepositoryBase.setContentSafety

contentDiff(self, package_id, dbconn, dbconn_package_id, extended=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier available in this repository
  • dbconn - other repository class instance
  • dbconn_package_id - package identifier available in other repository
  • extended - also return filetype (it is not considered in the comparison)
Returns: frozenset
content difference
Raises:
  • AttributeError - when self instance and dbconn are the same
Overrides: skel.EntropyRepositoryBase.contentDiff

clean(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.clean

getFakeSpmUid(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: int
new negative spm uid
Overrides: skel.EntropyRepositoryBase.getFakeSpmUid

getApi(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: int
Entropy repository API
Overrides: skel.EntropyRepositoryBase.getApi

getDependency(self, iddependency)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • iddependency - dependency identifier
Returns: string or None
dependency string
Overrides: skel.EntropyRepositoryBase.getDependency

getPackageIds(self, atom)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • atom - package atom
Returns: frozenset
list of matching package_ids found
Overrides: skel.EntropyRepositoryBase.getPackageIds

getPackageIdFromDownload(self, download_relative_path, endswith=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • download_relative_path - relative download path string returned by "retrieveDownloadURL" method
  • endswith - search for package_id which download metadata ends with the one provided by download_relative_path
Returns: int
package_id in repository or -1 if not found
Overrides: skel.EntropyRepositoryBase.getPackageIdFromDownload

getVersioningData(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: tuple
tuple of length 3 composed by (version, tag, revision,) belonging to package_id
Overrides: skel.EntropyRepositoryBase.getVersioningData

getStrictData(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: tuple
tuple of length 6 composed by (package key, slot, version, tag, revision, atom) belonging to package_id
Overrides: skel.EntropyRepositoryBase.getStrictData

getStrictScopeData(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: tuple
tuple of length 3 composed by (atom, slot, revision,) belonging to package_id
Overrides: skel.EntropyRepositoryBase.getStrictScopeData

getScopeData(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.getScopeData

getBaseData(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: tuple
tuple of length 19 composed by (atom, name, version, tag, description, category name, CHOST, CFLAGS, CXXFLAGS, homepage, license, branch, download path, digest, slot, api, creation date, package size, revision,) belonging to package_id
Overrides: skel.EntropyRepositoryBase.getBaseData

retrieveRepositoryUpdatesDigest(self, repository)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
Returns: string
digest string
Overrides: skel.EntropyRepositoryBase.retrieveRepositoryUpdatesDigest

listAllTreeUpdatesActions(self, no_ids_repos=False)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.listAllTreeUpdatesActions

retrieveTreeUpdatesActions(self, repository)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.retrieveTreeUpdatesActions

bumpTreeUpdatesActions(self, updates)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • updates - new treeupdates metadata
Overrides: skel.EntropyRepositoryBase.bumpTreeUpdatesActions

removeTreeUpdatesActions(self, repository)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - remove treeupdates metadata for provided repository
Overrides: skel.EntropyRepositoryBase.removeTreeUpdatesActions

insertTreeUpdatesActions(self, updates, repository)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • updates - new treeupdates metadata
  • repository - insert treeupdates metadata for provided repository
Overrides: skel.EntropyRepositoryBase.insertTreeUpdatesActions

setRepositoryUpdatesDigest(self, repository, digest)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
  • digest - treeupdates checksum string (md5)
Overrides: skel.EntropyRepositoryBase.setRepositoryUpdatesDigest

addRepositoryUpdatesActions(self, repository, actions, branch)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
  • actions - list of raw treeupdates action strings
  • branch - branch metadata to bind to the provided actions
Overrides: skel.EntropyRepositoryBase.addRepositoryUpdatesActions

clearPackageSets(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.clearPackageSets

insertPackageSets(self, sets_data)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • sets_data - dictionary containing package set names as keys and list (set) of dependencies as value
Overrides: skel.EntropyRepositoryBase.insertPackageSets

retrievePackageSets(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: dict
dictionary containing package set names as keys and list (set) of dependencies as value
Overrides: skel.EntropyRepositoryBase.retrievePackageSets

retrievePackageSet(self, setname)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • setname - Package set name
Returns: frozenset
list (set) of dependencies belonging to given package set name
Overrides: skel.EntropyRepositoryBase.retrievePackageSet

retrieveAtom(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
atom string
Overrides: skel.EntropyRepositoryBase.retrieveAtom

retrieveBranch(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
branch metadatum
Overrides: skel.EntropyRepositoryBase.retrieveBranch

retrieveTrigger(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
trigger script content
Overrides: skel.EntropyRepositoryBase.retrieveTrigger

retrieveDownloadURL(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
download url metadatum
Overrides: skel.EntropyRepositoryBase.retrieveDownloadURL

retrieveDescription(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
package description
Overrides: skel.EntropyRepositoryBase.retrieveDescription

retrieveHomepage(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
package homepage
Overrides: skel.EntropyRepositoryBase.retrieveHomepage

retrieveSpmUid(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: int
Spm UID or -1 (if not bound, valid for injected packages)
Overrides: skel.EntropyRepositoryBase.retrieveSpmUid

retrieveSize(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: int or None
size of Entropy package for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveSize

retrieveOnDiskSize(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: int
on disk size metadatum
Overrides: skel.EntropyRepositoryBase.retrieveOnDiskSize

retrieveDigest(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
md5 checksum for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveDigest

retrieveSignatures(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: tuple
tuple of length 3, sha1, sha256, sha512 package extra hashes if available, otherwise the same but with None as values.
Overrides: skel.EntropyRepositoryBase.retrieveSignatures

retrieveExtraDownload(self, package_id, down_type=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • down_type - retrieve data for a given entry type. Currently supported entry types are: "debug", "data".
Returns: tuple
list (tuple) of dict containing "download", "type", "size", "disksize, "md5", "sha1","sha256", "sha512", "gpg" keys. "download" contains the relative URL (like the one returned by retrieveDownloadURL())
Raises:
  • AttributeError - if provided down_type value is invalid
Overrides: skel.EntropyRepositoryBase.retrieveExtraDownload

retrieveName(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
"name" metadatum for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveName

retrieveKeySplit(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns:
tuple of length 2 composed by (package_category, package_name,)
Overrides: skel.EntropyRepositoryBase.retrieveKeySplit

retrieveKeySlot(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns:
tuple of length 2 composed by (package_key, package_slot,)
Overrides: skel.EntropyRepositoryBase.retrieveKeySlot

retrieveKeySlotAggregated(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
package key + ":" + slot string
Overrides: skel.EntropyRepositoryBase.retrieveKeySlotAggregated

retrieveKeySlotTag(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: tuple
tuple of length 3 providing (package_key, slot, package_tag,)
Overrides: skel.EntropyRepositoryBase.retrieveKeySlotTag

retrieveVersion(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
package version
Overrides: skel.EntropyRepositoryBase.retrieveVersion

retrieveRevision(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: int or None
Entropy-revision for given package indentifier
Overrides: skel.EntropyRepositoryBase.retrieveRevision

retrieveCreationDate(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
creation date for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveCreationDate

retrieveApi(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: int or None
Entropy API for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveApi

retrieveUseflags(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of USE flags for given package identifier.
Overrides: skel.EntropyRepositoryBase.retrieveUseflags

retrieveSpmPhases(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
"Source Package Manager available install phases" string
Overrides: skel.EntropyRepositoryBase.retrieveSpmPhases

retrieveSpmRepository(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
Source Package Manager source repository
Overrides: skel.EntropyRepositoryBase.retrieveSpmRepository

retrieveDesktopMime(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: list
list of dict() containing file association information
Overrides: skel.EntropyRepositoryBase.retrieveDesktopMime

retrieveProvidedMime(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of mimetypes
Overrides: skel.EntropyRepositoryBase.retrieveProvidedMime

retrieveNeeded(self, package_id, extended=False, formatted=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - also return ELF class information for every library name
  • formatted - properly format output, returning a dictionary with library name as key and ELF class as value
Returns: tuple or dict
"NEEDED" metadata for libraries contained in given package.
Overrides: skel.EntropyRepositoryBase.retrieveNeeded

retrieveNeededLibraries(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of tuples composed by library user path, library user soname, soname, elf class, rpath.
Overrides: skel.EntropyRepositoryBase.retrieveNeededLibraries

retrieveProvidedLibraries(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of tuples of length 3 composed by library name, path and ELF class
Overrides: skel.EntropyRepositoryBase.retrieveProvidedLibraries

retrieveConflicts(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of conflicting package dependencies
Overrides: skel.EntropyRepositoryBase.retrieveConflicts

retrieveProvide(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of atoms provided by package
Overrides: skel.EntropyRepositoryBase.retrieveProvide

retrieveDependenciesList(self, package_id, exclude_deptypes=None, resolve_conditional_deps=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • exclude_deptypes - exclude given dependency types from returned data. Please see etpConst['dependency_type_ids'] for valid values. Anything != int will raise AttributeError
  • resolve_conditional_deps - resolve conditional dependencies automatically by default, stuff like ( app-foo/foo | app-foo/bar ) & bar-baz/foo
Returns: frozenset
list (frozenset) of dependencies of package
Raises:
  • AttributeError - if exclude_deptypes contains illegal values
Overrides: skel.EntropyRepositoryBase.retrieveDependenciesList

retrieveBuildDependencies(self, package_id, extended=False, resolve_conditional_deps=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - return in extended format
  • resolve_conditional_deps - resolve conditional dependencies automatically by default, stuff like ( app-foo/foo | app-foo/bar ) & bar-baz/foo
Returns: frozenset
list (frozenset) of build dependencies of package
Overrides: skel.EntropyRepositoryBase.retrieveBuildDependencies

retrieveRuntimeDependencies(self, package_id, extended=False, resolve_conditional_deps=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - return in extended format
  • resolve_conditional_deps - resolve conditional dependencies automatically by default, stuff like ( app-foo/foo | app-foo/bar ) & bar-baz/foo
Returns: frozenset
list (frozenset) of build dependencies of package
Overrides: skel.EntropyRepositoryBase.retrieveRuntimeDependencies

retrievePostDependencies(self, package_id, extended=False, resolve_conditional_deps=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - return in extended format
  • resolve_conditional_deps - resolve conditional dependencies automatically by default, stuff like ( app-foo/foo | app-foo/bar ) & bar-baz/foo
Returns: frozenset
list (frozenset) of post dependencies of package
Overrides: skel.EntropyRepositoryBase.retrievePostDependencies

retrieveManualDependencies(self, package_id, extended=False, resolve_conditional_deps=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - return in extended format
  • resolve_conditional_deps - resolve conditional dependencies automatically by default, stuff like ( app-foo/foo | app-foo/bar ) & bar-baz/foo
Returns: frozenset
list (frozenset) of manual dependencies of package
Overrides: skel.EntropyRepositoryBase.retrieveManualDependencies

retrieveDependencies(self, package_id, extended=False, deptype=None, exclude_deptypes=None, resolve_conditional_deps=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - return in extended format (list of tuples of length 2 composed by dependency name and dependency type)
  • deptype - return only given type of dependencies see etpConst['dependency_type_ids']['*depend_id'] for dependency type identifiers
  • exclude_deptypes - exclude given dependency types from returned data. Please see etpConst['dependency_type_ids'] for valid values. Anything != int will raise AttributeError
  • resolve_conditional_deps - resolve conditional dependencies automatically by default, stuff like ( app-foo/foo | app-foo/bar ) & bar-baz/foo
Returns: tuple or frozenset
dependencies of given package
Raises:
  • AttributeError - if exclude_deptypes contains illegal values
Overrides: skel.EntropyRepositoryBase.retrieveDependencies

retrieveKeywords(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of keywords for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveKeywords

retrieveProtect(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string
CONFIG_PROTECT string
Overrides: skel.EntropyRepositoryBase.retrieveProtect

retrieveProtectMask(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string
CONFIG_PROTECT_MASK string
Overrides: skel.EntropyRepositoryBase.retrieveProtectMask

retrieveSources(self, package_id, extended=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended
Returns: dict or frozenset
if extended is True, dict composed by source URLs as key and list of mirrors as value, otherwise just a list (frozenset) of source package URLs.
Overrides: skel.EntropyRepositoryBase.retrieveSources

retrieveAutomergefiles(self, package_id, get_dict=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • get_dict - return a dictionary with configuration file as key and md5 hash as value
Returns: frozenset or dict
automerge metadata for given package identifier
Overrides: skel.EntropyRepositoryBase.retrieveAutomergefiles

retrieveContent(self, package_id, extended=False, formatted=False, insert_formatted=False, order_by=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • extended - return in extended format
  • formatted - return in dict() form
  • insert_formatted - return in list of tuples form, ready to be added with insertContent()
  • order_by - order by string, valid values are: "type" (if extended is True), "file" or "package_id"
Returns: dict or tuple or frozenset
content metadata
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.retrieveContent

retrieveContentIter(self, package_id, order_by=None, reverse=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • order_by - order by string, valid values are: "type" (if extended is True), "file" or "package_id"
  • reverse - return elements in reverse order
Returns: iterator
content metadata
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.retrieveContentIter

retrieveContentSafety(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: dict
content safety metadata
Overrides: skel.EntropyRepositoryBase.retrieveContentSafety

retrieveContentSafetyIter(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • order_by - order by string, valid values are: "type" (if extended is True), "file" or "package_id"
Returns: iterator
contentsafety metadata
Overrides: skel.EntropyRepositoryBase.retrieveContentSafetyIter

retrieveChangelog(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
ChangeLog content
Overrides: skel.EntropyRepositoryBase.retrieveChangelog

retrieveChangelogByKey(self, category, name)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • category - package category
  • name - package name
Returns: string or None
ChangeLog content
Overrides: skel.EntropyRepositoryBase.retrieveChangelogByKey

retrieveSlot(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
package slot
Overrides: skel.EntropyRepositoryBase.retrieveSlot

retrieveTag(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
tag string
Overrides: skel.EntropyRepositoryBase.retrieveTag

retrieveMirrorData(self, mirrorname)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • mirrorname - mirror name (for eg. "openoffice")
Returns: frozenset
list (frozenset) of URLs providing the "openoffice" mirroring service
Overrides: skel.EntropyRepositoryBase.retrieveMirrorData

retrieveCategory(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
category where package is in
Overrides: skel.EntropyRepositoryBase.retrieveCategory

retrieveCategoryDescription(self, category)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • category - category name
Returns: dict
category description dict, locale as key, description as value
Overrides: skel.EntropyRepositoryBase.retrieveCategoryDescription

retrieveLicenseData(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: dict
dictionary composed by license name as key and license text as value
Overrides: skel.EntropyRepositoryBase.retrieveLicenseData

retrieveLicenseDataKeys(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: frozenset
list (frozenset) of license names which text is available in repository
Overrides: skel.EntropyRepositoryBase.retrieveLicenseDataKeys

retrieveLicenseText(self, license_name)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • license_name - license name (for eg. GPL-2)
Returns: string (raw format) or None
license text
Overrides: skel.EntropyRepositoryBase.retrieveLicenseText

retrieveLicense(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
license string
Overrides: skel.EntropyRepositoryBase.retrieveLicense

retrieveCompileFlags(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.retrieveCompileFlags

retrieveReverseDependencies(self, package_id, atoms=False, key_slot=False, exclude_deptypes=None, extended=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • atoms - if True, method returns list of atoms
  • key_slot - if True, method returns list of dependencies in key:slot form, example: (('app-foo/bar','2',), ...)
  • exclude_deptypes - exclude given dependency types from returned data. Please see etpConst['dependency_type_ids'] for valid values. Anything != int will raise AttributeError
  • extended - if True, the original dependency string will be returned along with the rest of information. So, if data returned would be a list of package identifiers (int), if extended = True this method will return a list of tuples composed by (package_id, dep_string). Same for atoms = True and key_slot = True.
Returns: tuple or frozenset
reverse dependency list (tuple) (or list of lists in case of extended = True)
Raises:
  • AttributeError - if exclude_deptypes contains illegal values
Overrides: skel.EntropyRepositoryBase.retrieveReverseDependencies

retrieveUnusedPackageIds(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: tuple
unused package_ids ordered by atom
Overrides: skel.EntropyRepositoryBase.retrieveUnusedPackageIds

arePackageIdsAvailable(self, package_ids)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_ids - list of package indentifiers
Returns: bool
availability (True if all are available)
Overrides: skel.EntropyRepositoryBase.arePackageIdsAvailable

isPackageIdAvailable(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: bool
availability (True if available)
Overrides: skel.EntropyRepositoryBase.isPackageIdAvailable

isFileAvailable(self, path, get_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • path - path to file or directory
  • get_id - return list (set) of package_ids owning myfile
Returns: bool or frozenset
availability (True if available), when get_id is True, it returns a list (frozenset) of package_ids owning myfile
Overrides: skel.EntropyRepositoryBase.isFileAvailable

resolveNeeded(self, needed, elfclass=-1, extended=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • needed - library name
  • elfclass - look for library name matching given ELF class
  • extended - return a frozenset of tuple of length 2, first element is package_id, second is actual library path
Returns: frozenset
list of packages owning given library
Overrides: skel.EntropyRepositoryBase.resolveNeeded

isSpmUidAvailable(self, spm_uid)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • spm_uid - Source Package Manager package identifier
Returns: bool
availability (True, if available)
Overrides: skel.EntropyRepositoryBase.isSpmUidAvailable

isSpmUidTrashed(self, spm_uid)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • spm_uid - Source Package Manager package identifier
Returns: bool
availability (True, if available)
Overrides: skel.EntropyRepositoryBase.isSpmUidTrashed

isLicenseDataKeyAvailable(self, license_name)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • license_name - license name which license text is available
Returns: bool
availability (True, if available)
Overrides: skel.EntropyRepositoryBase.isLicenseDataKeyAvailable

isLicenseAccepted(self, license_name)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • license_name - license name
Returns: bool
if license name has been accepted by user
Overrides: skel.EntropyRepositoryBase.isLicenseAccepted

isSystemPackage(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: bool
if True, package is part of core system
Overrides: skel.EntropyRepositoryBase.isSystemPackage

isInjected(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: bool
injection status (True if injected)
Overrides: skel.EntropyRepositoryBase.isInjected

searchBelongs(self, bfile, like=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • bfile - file path to search
  • like - do not match exact case
Returns: frozenset
list (frozenset) of package identifiers owning given file
Overrides: skel.EntropyRepositoryBase.searchBelongs

searchContentSafety(self, sfile)

source code 

Search content safety metadata (usually, sha256 and mtime) related to given file path. A list of dictionaries is returned, each dictionary item contains at least the following fields "path", "sha256", "mtime").

Parameters:
  • sfile (string) - file path to search
Returns: tuple
content safety metadata list
Overrides: skel.EntropyRepositoryBase.searchContentSafety

searchTaggedPackages(self, tag, atoms=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • tag - tag name to search
  • atoms - return list of atoms instead of package identifiers
Returns: frozenset
list of packages using given tag
Overrides: skel.EntropyRepositoryBase.searchTaggedPackages

searchRevisionedPackages(self, revision)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • revision - Entropy revision to search
Returns: frozenset
list (frozenset) of packages using given tag
Overrides: skel.EntropyRepositoryBase.searchRevisionedPackages

acceptLicense(self, license_name)

source code 

Reimplemented from EntropyRepositoryBase. Needs to call superclass method.

Parameters:
  • license_name - license name
Overrides: skel.EntropyRepositoryBase.acceptLicense

searchLicense(self, keyword, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - license name to search
  • just_id - just return package identifiers, otherwise a frozenset of tuples of length 2 is returned
Returns: frozenset
list (frozenset) of packages using given license
Overrides: skel.EntropyRepositoryBase.searchLicense

searchSlotted(self, keyword, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - slot to search
  • just_id - just return package identifiers, otherwise a frozenset of tuples of length 2 is returned
Returns: frozenset
list (frozenset) of packages using given slot
Overrides: skel.EntropyRepositoryBase.searchSlotted

searchKeySlot(self, key, slot)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • key - package key
  • slot - package slot
Returns: frozenset
list (frozenset) of package identifiers
Overrides: skel.EntropyRepositoryBase.searchKeySlot

searchKeySlotTag(self, key, slot, tag)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • key - package key
  • slot - package slot
  • tag - restrict search using tag, if provided
Returns: frozenset
list (frozenset) of package identifiers
Overrides: skel.EntropyRepositoryBase.searchKeySlotTag

searchNeeded(self, needed, elfclass=-1, like=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • needed - NEEDED ELF entry (shared object library name)
  • elfclass - search NEEDEDs only with given ELF class
  • like - do not match exact case
Returns: frozenset
list (frozenset) of package identifiers
Overrides: skel.EntropyRepositoryBase.searchNeeded

searchConflict(self, conflict, strings=False)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.searchConflict

searchDependency(self, dep, like=False, multi=False, strings=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • dep - dependency name
  • like - do not match exact case
  • multi - return all the matching dependency names
  • strings - return dependency names rather than dependency identifiers
Returns: int or frozenset
list (frozenset) of dependency identifiers (if multi is True) or strings (if strings is True) or dependency identifier
Overrides: skel.EntropyRepositoryBase.searchDependency

searchPackageIdFromDependencyId(self, dependency_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • dependency_id - dependency identifier
Returns: frozenset
list (frozenset) of package identifiers owning given dependency identifier
Overrides: skel.EntropyRepositoryBase.searchPackageIdFromDependencyId

searchSets(self, keyword)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - package set name to search
Returns: frozenset
list (frozenset) of package sets available matching given keyword
Overrides: skel.EntropyRepositoryBase.searchSets

searchProvidedMime(self, mimetype)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • mimetype - mimetype to search
Returns: tuple
list (tuple) of package indentifiers owning given mimetype.
Overrides: skel.EntropyRepositoryBase.searchProvidedMime

searchSimilarPackages(self, keyword, atom=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - package string to search
  • atom - return full atoms instead of package names
Returns: tuple
list (tuple) of similar package names
Overrides: skel.EntropyRepositoryBase.searchSimilarPackages

searchPackages(self, keyword, sensitive=False, slot=None, tag=None, order_by=None, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - package string
  • sensitive - case sensitive?
  • slot - search matching given slot
  • tag - search matching given package tag
  • order_by - order results by "atom", "package_id", "branch", "name", "version", "versiontag", "revision", "slot"
  • just_id - just return package identifiers
Returns: tuple
packages found matching given search criterias
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.searchPackages

searchProvidedVirtualPackage(self, keyword)

source code 

Search in old-style Portage PROVIDE metadata.

Parameters:
  • keyword (string) - search term
Returns: list
found PROVIDE metadata
Overrides: skel.EntropyRepositoryBase.searchProvidedVirtualPackage

To Do: rewrite docstring :-)

searchDescription(self, keyword, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - description sub-string to search
  • just_id - if True, only return a list of Entropy package identifiers
Returns: frozenset
frozenset of tuples of length 2 containing atom and package_id values. While if just_id is True, return a list (frozenset) of package_ids
Overrides: skel.EntropyRepositoryBase.searchDescription

searchUseflag(self, keyword, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - use flag to search
  • just_id - if True, only return a list of Entropy package identifiers
Returns: frozenset
frozenset of tuples of length 2 containing atom and package_id values. While if just_id is True, return a list (frozenset) of package_ids
Overrides: skel.EntropyRepositoryBase.searchUseflag

searchHomepage(self, keyword, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - description sub-string to search
  • just_id - if True, only return a list of Entropy package identifiers
Returns: frozenset
frozenset of tuples of length 2 containing atom and package_id values. While if just_id is True, return a list (frozenset) of package_ids
Overrides: skel.EntropyRepositoryBase.searchHomepage

searchName(self, keyword, sensitive=False, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - package name to search
  • sensitive - case sensitive?
  • just_id - return list of package identifiers (set()) otherwise return a list of tuples of length 2 containing atom and package_id values
Returns: frozenset
list (frozenset) of packages found
Overrides: skel.EntropyRepositoryBase.searchName

searchCategory(self, keyword, like=False, just_id=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • keyword - category name
  • like - do not match exact case
  • just_id - return list of package identifiers (set()) otherwise return a list of tuples of length 2 containing atom and package_id values
Returns: frozenset
list (frozenset) of tuples of length 2 containing atom and package_id values
Overrides: skel.EntropyRepositoryBase.searchCategory

searchNameCategory(self, name, category, just_id=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • name - package name to search
  • category - package category to search
  • just_id - return list of package identifiers (set()) otherwise return a list of tuples of length 2 containing atom and package_id values
Returns: frozenset
list (frozenset) of packages found
Overrides: skel.EntropyRepositoryBase.searchNameCategory

isPackageScopeAvailable(self, atom, slot, revision)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • atom - package atom string
  • slot - package slot string
  • revision - entropy package revision
Returns: tuple
tuple composed by (package_id or -1, idreason or 0,)
Overrides: skel.EntropyRepositoryBase.isPackageScopeAvailable

isBranchMigrationAvailable(self, repository, from_branch, to_branch)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
  • from_branch - original branch
  • to_branch - destination branch
Returns: tuple
tuple composed by (1)post migration script md5sum and (2)post upgrade script md5sum
Overrides: skel.EntropyRepositoryBase.isBranchMigrationAvailable

listPackageIdsInCategory(self, category, order_by=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • category_id - cateogory name
  • order_by - order by "atom", "idpackage", "package_id", "branch", "name", "version", "versiontag", "revision", "slot"
Returns: frozenset
list (frozenset) of available package identifiers in category.
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.listPackageIdsInCategory

listAllPackages(self, get_scope=False, order_by=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • get_scope - return also entropy package revision
  • order_by - order by "atom", "idpackage", "package_id", "branch", "name", "version", "versiontag", "revision", "slot"
Returns: tuple
tuple of tuples of length 3 (or 4 if get_scope is True), containing (atom, package_id, branch,) if get_scope is False and (package_id, atom, slot, revision,) if get_scope is True
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.listAllPackages

listAllSpmUids(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: tuple
tuple of tuples of length 2 composed by (spm_uid, package_id,)
Overrides: skel.EntropyRepositoryBase.listAllSpmUids

listAllTrashedSpmUids(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: tuple
list of identifiers
Overrides: skel.EntropyRepositoryBase.listAllTrashedSpmUids

listAllPackageIds(self, order_by=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • order_by - order by "atom", "idpackage", "package_id", "branch", "name", "version", "versiontag", "revision", "slot", "date"
Returns: tuple or frozenset
tuple (if order_by) or frozenset of package identifiers
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.listAllPackageIds

listAllInjectedPackageIds(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: frozenset
frozenset of package identifiers
Overrides: skel.EntropyRepositoryBase.listAllInjectedPackageIds

listAllSystemPackageIds(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: frozenset
frozenset of package identifiers
Overrides: skel.EntropyRepositoryBase.listAllSystemPackageIds

listAllDependencies(self)

source code 

Reimplemented from EntropyRepositoryBase.

Returns: list
list of tuples of length 2 containing (dependency id, dependency,)
Overrides: skel.EntropyRepositoryBase.listAllDependencies

listAllDownloads(self, do_sort=True, full_path=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • do_sort - sort by name
  • full_path - return full URL (not just package file name)
Returns: tuple or frozenset
tuple (or set if do_sort is True) of package download URLs
Overrides: skel.EntropyRepositoryBase.listAllDownloads

listAllExtraDownloads(self, do_sort=True)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • do_sort - sort by name
  • full_path - return full URL (not just package file name)
Returns: tuple or frozenset
tuple (or set if do_sort is True) of package download URLs
Overrides: skel.EntropyRepositoryBase.listAllExtraDownloads

listAllFiles(self, clean=False, count=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • clean - return a clean list (not duplicates)
  • count - count elements and return number
Returns: int or tuple or frozenset
tuple of files available or their count
Overrides: skel.EntropyRepositoryBase.listAllFiles

listAllCategories(self, order_by=None)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • order_by - order by "category"
Returns: frozenset
list (frozenset) of available package categories
Raises:
  • AttributeError - if order_by value is invalid
Overrides: skel.EntropyRepositoryBase.listAllCategories

listConfigProtectEntries(self, mask=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • mask - return CONFIG_PROTECT_MASK metadata instead of CONFIG_PROTECT
Returns: list
list of protected/masked directories
Overrides: skel.EntropyRepositoryBase.listConfigProtectEntries

switchBranch(self, package_id, tobranch)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package identifier
  • tobranch - new branch value
Overrides: skel.EntropyRepositoryBase.switchBranch

getSetting(self, setting_name)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • setting_name - name of repository setting
Returns: string
setting value
Raises:
  • KeyError - if setting_name is not valid or available
Overrides: skel.EntropyRepositoryBase.getSetting

integrity_check(self)

source code 

Not implemented, subclasses must implement this.

Raises:
Overrides: skel.EntropyRepositoryBase.integrity_check

validate(self)

source code 

Reimplemented from EntropyRepositoryBase.

Raises:
Overrides: skel.EntropyRepositoryBase.validate

importRepository(dumpfile, db, data=None)
Static Method

source code 

Not implemented, subclasses must implement this.

Parameters:
  • dumpfile - dump file to read
  • dbfile - database file path or reference name
  • data - connection data (dict object)
Returns: int
import return code (0 = OK)
Raises:
  • AttributeError - if given paths are invalid
Overrides: skel.EntropyRepositoryBase.importRepository

exportRepository(self, dumpfile)

source code 

Not implemented, subclasses must implement this.

Parameters:
  • dumpfile - dump file object to write to
Overrides: skel.EntropyRepositoryBase.exportRepository

mtime(self)

source code 

Not implemented, subclasses must implement this.

Returns: float
mtime
Raises:
  • IOError - if mtime cannot be retrieved
  • OSError - if mtime cannot be retrieved (Operating System error)
Overrides: skel.EntropyRepositoryBase.mtime

checksum(self, do_order=False, strict=True, include_signatures=False, include_dependencies=False)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • do_order - order metadata collection alphabetically
  • strict - improve checksum accuracy
  • include_signatures - also include packages signatures (GPG, SHA1, SHA2, etc) into the returned hash
  • include_dependencies - also include package dependencies into the returned hash
Returns: string
repository checksum
Overrides: skel.EntropyRepositoryBase.checksum

storeInstalledPackage(self, package_id, repoid, source=0)

source code 

Reimplemented from EntropySQLRepository.

Parameters:
  • package_id - package indentifier
  • repoid - repository identifier
  • source - source identifier (pleas see: etpConst['install_sources'])
Overrides: skel.EntropyRepositoryBase.storeInstalledPackage

getInstalledPackageRepository(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: string or None
repository identifier
Overrides: skel.EntropyRepositoryBase.getInstalledPackageRepository

getInstalledPackageSource(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: int or None
install source identifier
Overrides: skel.EntropyRepositoryBase.getInstalledPackageSource

setInstalledPackageSource(self, package_id, source)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • source - install source identified
Overrides: skel.EntropyRepositoryBase.setInstalledPackageSource

dropInstalledPackageFromStore(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Overrides: skel.EntropyRepositoryBase.dropInstalledPackageFromStore

storeSpmMetadata(self, package_id, blob)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
  • blob - metadata blob
Overrides: skel.EntropyRepositoryBase.storeSpmMetadata

retrieveSpmMetadata(self, package_id)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • package_id - package indentifier
Returns: buffer
stored metadata
Overrides: skel.EntropyRepositoryBase.retrieveSpmMetadata

retrieveBranchMigration(self, to_branch)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • to_branch - usually the current branch string
Returns: dict
branch migration metadata contained in database
Overrides: skel.EntropyRepositoryBase.retrieveBranchMigration

dropContent(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.dropContent

dropContentSafety(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.dropContentSafety

dropChangelog(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.dropChangelog

dropGpgSignatures(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.dropGpgSignatures

dropAllIndexes(self)

source code 

Not implemented, subclasses must implement this.

Overrides: skel.EntropyRepositoryBase.dropAllIndexes

createAllIndexes(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.createAllIndexes

regenerateSpmUidMapping(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.regenerateSpmUidMapping

clearTreeupdatesEntries(self, repository)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • repository - repository identifier
Overrides: skel.EntropyRepositoryBase.clearTreeupdatesEntries

resetTreeupdatesDigests(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: skel.EntropyRepositoryBase.resetTreeupdatesDigests

moveSpmUidsToBranch(self, to_branch)

source code 

Reimplemented from EntropyRepositoryBase.

Parameters:
  • to_branch - new branch string
  • from_branch - old branch string
Overrides: skel.EntropyRepositoryBase.moveSpmUidsToBranch