Package entropy :: Package client :: Package interfaces :: Module db :: Class GenericRepository

Class GenericRepository

source code


This class represents a generic packages repository and is a direct subclass of EntropyRepository. Even GenericRepository is a CachedRepository because its object could get cached by 3rd party. Actually, we require this because our installed packages repository could end up being a GenericRepository, when running in fail-safe mode.

Nested Classes

Inherited from db.sqlite.EntropySQLiteRepository: ModuleProxy, SQLiteProxy

Inherited from db.sql.EntropySQLRepository: Schema

Instance Methods
 
handlePackage(self, pkg_data, revision=None, formattedContent=False)
Reimplemented from EntropyRepository.
source code
tuple
maskFilter(self, package_id, live=True)
Reimplemented from EntropyRepository.
source code

Inherited from CachedRepository: close, setCloseToken

Inherited from db.sqlite.EntropySQLiteRepository: __init__, __repr__, __str__, __unicode__, acquire_exclusive, acquire_shared, checksum, createAllIndexes, dropAllIndexes, dropContentSafety, dropInstalledPackageFromStore, exportRepository, getBaseData, getInstalledPackageRepository, getInstalledPackageSource, getScopeData, getStrictData, getStrictScopeData, getVersioningData, initializeRepository, insertDependencies, integrity_check, listAllCategories, listAllExtraDownloads, listAllPreservedLibraries, listPackageIdsInCategory, lock_path, mtime, readonly, release_exclusive, release_shared, removeDependencies, retrieveBranchMigration, retrieveCategory, retrieveChangelog, retrieveCompileFlags, retrieveContentSafety, retrieveContentSafetyIter, retrieveDependencies, retrieveDesktopMime, retrieveDigest, retrieveExtraDownload, retrieveKeySlot, retrieveKeySlotAggregated, retrieveKeySlotTag, retrieveKeySplit, retrievePreservedLibraries, retrieveProvidedMime, retrieveRevision, retrieveSlot, retrieveSpmMetadata, retrieveTag, retrieveUseflags, retrieveVersion, searchCategory, searchKeySlot, searchKeySlotTag, searchLicense, searchNameCategory, searchProvidedMime, searchSets, setAtom, setCategory, setDependency, setName, setRevision, setSlot, storeInstalledPackage, try_acquire_exclusive, try_acquire_shared, vacuum

Inherited from db.sql.EntropySQLRepository: acceptLicense, addPackage, addRepositoryUpdatesActions, arePackageIdsAvailable, bumpTreeUpdatesActions, clean, clearCache, clearPackageSets, clearTreeupdatesEntries, commit, contentDiff, dropChangelog, dropContent, dropGpgSignatures, getApi, getDependency, getFakeSpmUid, getPackageIdFromDownload, getPackageIds, getSetting, insertAutomergefiles, insertBranchMigration, insertConflicts, insertContent, insertPackageSets, insertPreservedLibrary, insertSpmUid, insertTreeUpdatesActions, isBranchMigrationAvailable, isFileAvailable, isInjected, isLicenseAccepted, isLicenseDataKeyAvailable, isPackageIdAvailable, isPackageScopeAvailable, isSpmUidAvailable, isSpmUidTrashed, isSystemPackage, listAllDependencies, listAllDownloads, listAllFiles, listAllInjectedPackageIds, listAllPackageIds, listAllPackages, listAllSpmUids, listAllSystemPackageIds, listAllTrashedSpmUids, listAllTreeUpdatesActions, listConfigProtectEntries, moveSpmUidsToBranch, regenerateSpmUidMapping, removeConflicts, removePackage, removePreservedLibrary, removeTrashedUids, removeTreeUpdatesActions, resetTreeupdatesDigests, resolveNeeded, retrieveApi, retrieveAtom, retrieveAutomergefiles, retrieveBranch, retrieveBuildDependencies, retrieveCategoryDescription, retrieveChangelogByKey, retrieveConflicts, retrieveContent, retrieveContentIter, retrieveCreationDate, retrieveDependenciesList, retrieveDescription, retrieveDownloadURL, retrieveHomepage, retrieveKeywords, retrieveLicense, retrieveLicenseData, retrieveLicenseDataKeys, retrieveLicenseText, retrieveManualDependencies, retrieveMirrorData, retrieveName, retrieveNeeded, retrieveNeededLibraries, retrieveOnDiskSize, retrievePackageSet, retrievePackageSets, retrievePostDependencies, retrieveProtect, retrieveProtectMask, retrieveProvide, retrieveProvidedLibraries, retrieveRepositoryUpdatesDigest, retrieveReverseDependencies, retrieveRuntimeDependencies, retrieveSignatures, retrieveSize, retrieveSources, retrieveSpmPhases, retrieveSpmRepository, retrieveSpmUid, retrieveTreeUpdatesActions, retrieveTrigger, retrieveUnusedPackageIds, rollback, searchBelongs, searchConflict, searchContentSafety, searchDependency, searchDescription, searchHomepage, searchName, searchNeeded, searchPackageIdFromDependencyId, searchPackages, searchProvidedVirtualPackage, searchRevisionedPackages, searchSimilarPackages, searchSlotted, searchTaggedPackages, searchUseflag, setBranchMigrationPostUpgradeMd5sum, setCategoryDescription, setContentSafety, setCreationDate, setDigest, setDownloadURL, setIndexing, setInjected, setRepositoryUpdatesDigest, setSignatures, setSpmUid, setTrashedUid, storeSpmMetadata, switchBranch, validate

Inherited from MaskableRepository: atomMatchCacheKey

Inherited from db.skel.EntropyRepositoryBase: alignDatabases, atomMatch, cache_policy, cache_policy_all, cache_policy_none, caching, direct, directed, exclusive, filterTreeUpdatesActions, getPackageData, getPackageXmlData, getPackagesToRemove, getTriggerData, repository_id, runTreeUpdatesActions, shared, temporary

Inherited from db.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__, __setattr__, __sizeof__, __subclasshook__

Class Methods

Inherited from db.sql.EntropySQLRepository: isMainThread

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

Static Methods

Inherited from db.sqlite.EntropySQLiteRepository: importRepository

Inherited from db.sql.EntropySQLRepository: remote_revision, revision, update

Inherited from db.skel.EntropyRepositoryPluginStore: add_permanent_plugin, get_permanent_plugins, remove_permanent_plugin

Class Variables

Inherited from db.sqlite.EntropySQLiteRepository: SETTING_KEYS

Inherited from db.sql.EntropySQLRepository: GENERIC_NAME

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

Inherited from output.TextInterface: OUTPUT_LOCK

Properties

Inherited from object: __class__

Method Details

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

source code 

Reimplemented from EntropyRepository. It is supposed that a generic repository should not support handlePackage. You can override this (at your own risk) by setting the "override_handlePackage" property to True. In this case, a generic addPackage() call is issued.

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

maskFilter(self, package_id, live=True)

source code 

Reimplemented from EntropyRepository. It is supposed that a generic repository doesn't support package masking. You can override this by setting the "enable_mask_filter" to True.

Parameters:
  • package_id - package indentifier
  • live - use live masking feature
Returns: tuple
tuple composed by package_id and masking reason. If package_id returned package_id value == -1, it means that package is masked and a valid masking reason identifier is returned as second value of the tuple (see SystemSettings['pkg_masking_reasons'])
Overrides: db.skel.EntropyRepositoryBase.maskFilter