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

Class AvailablePackagesRepository

source code


This class represents the available packages repository and is a direct subclass of EntropyRepository. It implements the update() method in order to make possible to update the repository.

Nested Classes

Inherited from db.sqlite.EntropySQLiteRepository: ModuleProxy, SQLiteProxy

Inherited from db.sql.EntropySQLRepository: Schema

Instance Methods
 
__init__(self, *args, **kwargs)
EntropySQLiteRepository constructor.
source code
 
handlePackage(self, pkg_data, revision=None, formattedContent=False)
Reimplemented from EntropyRepository
source code
int
addPackage(self, pkg_data, revision=-1, package_id=None, formatted_content=False)
Reimplemented from EntropyRepository
source code
 
removePackage(self, package_id, from_add_package=False)
Reimplemented from EntropyRepository
source code
 
clearCache(self)
Reimplemented from EntropyRepositoryBase.
source code

Inherited from CachedRepository: close, setCloseToken

Inherited from db.sqlite.EntropySQLiteRepository: __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, addRepositoryUpdatesActions, arePackageIdsAvailable, bumpTreeUpdatesActions, clean, 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, 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, maskFilter

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
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

Inherited from db.sqlite.EntropySQLiteRepository: importRepository

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

__init__(self, *args, **kwargs)
(Constructor)

source code 

EntropySQLiteRepository constructor.

Parameters:
  • readOnly - open file in read-only mode
  • dbFile - path to database to open
  • xcache - enable on-disk cache
  • name - repository identifier
  • indexing - enable database indexes
  • skipChecks - if True, skip integrity checks
  • temporary - if True, dbFile will be automatically removed on close()
  • direct - True, if direct mode should be always enabled
  • cache_policy - set the cache policy that should be used
Overrides: object.__init__
(inherited documentation)

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

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

source code 

Reimplemented from EntropyRepository

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

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

source code 

Reimplemented from EntropyRepository

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

removePackage(self, package_id, from_add_package=False)

source code 

Reimplemented from EntropyRepository

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

clearCache(self)

source code 

Reimplemented from EntropyRepositoryBase.

Overrides: db.skel.EntropyRepositoryBase.clearCache
(inherited documentation)