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

Class CachedRepository

source code


This kind of repository cannot have close() called directly, without a valid token passed. This is because the class object is cached somewhere and calling close() would turn into a software bug.

Nested Classes

Inherited from db.sqlite.EntropySQLiteRepository: ModuleProxy, SQLiteProxy

Inherited from db.sql.EntropySQLRepository: Schema

Instance Methods
 
setCloseToken(self, token)
Set a token that can be used to validate close() calls.
source code
 
close(self, safe=False, _token=None)
Reimplemented from EntropyRepository
source code

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, handlePackage, 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 db.skel.EntropyRepositoryBase: alignDatabases, atomMatch, atomMatchCacheKey, cache_policy, cache_policy_all, cache_policy_none, caching, direct, directed, exclusive, filterTreeUpdatesActions, getPackageData, getPackageXmlData, getPackagesToRemove, getTriggerData, maskFilter, 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

setCloseToken(self, token)

source code 

Set a token that can be used to validate close() calls. Calling close() on these repos is prohibited and considered a software bug. Only Entropy Client should be able to close them.

close(self, safe=False, _token=None)

source code 

Reimplemented from EntropyRepository

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: db.skel.EntropyRepositoryBase.close