Package entropy :: Module db :: Class EntropyRepository

Class EntropyRepository

source code

EntropyRepository implements SQLite3 based storage. In a Model-View based pattern, it can be considered the "model". Actually it's the only one available but more model backends will be supported in future (which will inherit this class directly).

Every Entropy repository storage interface MUST inherit from this base class.


To Do: refactoring and generalization needed

Nested Classes
  Schema
Instance Methods
 
__init__(self, readOnly=False, noUpload=False, dbFile=None, clientDatabase=False, xcache=False, dbname='etpdb:', indexing=True, OutputInterface=None, skipChecks=False, useBranch=None, lockRemote=True)
EntropyRepository constructor.
source code
 
setCacheSize(self, size)
Change low-level, storage engine based cache size.
source code
 
setDefaultCacheSize(self, size)
Change default low-level, storage engine based cache size.
source code
 
__del__(self) source code
 
closeDB(self)
Close repository storage communication.
source code
 
vacuum(self)
Repository storage cleanup and optimization function.
source code
 
commitChanges(self)
Commit actual changes and make them permanently stored.
source code
 
taintDatabase(self)
Server-side method that render your repository storage tainted, modified.
source code
 
untaintDatabase(self)
Server-side method that render your repository storage NOT tainted, modified.
source code
bool
isDatabaseTainted(self)
Server-side function used to determine whether repository database has been modified.
source code
 
initializeDatabase(self)
WARNING: it will erase your database.
source code
list
filterTreeUpdatesActions(self, actions)
This method should be considered internal and not suited for general audience.
source code
 
runTreeUpdatesActions(self, actions)
docstring_title
source code
 
runTreeUpdatesMoveAction(self, move_command, quickpkg_queue)
docstring_title
source code
 
runTreeUpdatesSlotmoveAction(self, slotmove_command, quickpkg_queue)
docstring_title
source code
 
doTreeupdatesSpmCleanup(self, spm_moves)
Erase dead Source Package Manager db entries.
source code
 
handlePackage(self, etpData, forcedRevision=-1, formattedContent=False)
Update or add a package to repository automatically handling its scope and thus removal of previous versions if requested by the given metadata.
source code
set
retrieve_packages_to_remove(self, name, category, slot, injected)
Return a list of packages that would be removed given name, category, slot and injection status.
source code
tuple
addPackage(self, etpData, revision=-1, idpackage=None, do_commit=True, formatted_content=False)
Add package to this Entropy repository.
source code
 
removePackage(self, idpackage, do_cleanup=True, do_commit=True, do_rss=True)
Remove package from this Entropy repository using it's identifier (idpackage).
source code
 
removeMirrorEntries(self, mirrorname)
Remove source packages mirror entries from database for the given mirror name.
source code
 
addMirrors(self, mirrorname, mirrorlist)
Add source package mirror entry to database.
source code
int
addCategory(self, category)
Add package category string to repository.
source code
int
addProtect(self, protect)
Add a single, generic CONFIG_PROTECT (not defined as _MASK/whatever here) path.
source code
int
addSource(self, source)
Add source code package download path to repository.
source code
int
addDependency(self, dependency)
Add dependency string to repository.
source code
int
addKeyword(self, keyword)
Add package SPM keyword string to repository.
source code
int
addUseflag(self, useflag)
Add package USE flag string to repository.
source code
int
addEclass(self, eclass)
Add package SPM Eclass string to repository.
source code
int
addNeeded(self, needed)
Add package libraries' ELF object NEEDED string to repository.
source code
int
addLicense(self, pkglicense)
Add package license name string to repository.
source code
int
addCompileFlags(self, chost, cflags, cxxflags)
Add package Compiler flags used to repository.
source code
 
setSystemPackage(self, idpackage, do_commit=True)
Mark a package as system package, which means that entropy.client will deny its removal.
source code
 
setInjected(self, idpackage, do_commit=True)
Mark package as injected, injection is usually set for packages manually added to repository.
source code
 
setDateCreation(self, idpackage, date)
Update the creation date for package.
source code
 
setDigest(self, idpackage, digest)
Set package file md5sum for package.
source code
 
setSignatures(self, idpackage, sha1, sha256, sha512)
Set package file extra hashes (sha1, sha256, sha512) for package.
source code
 
setDownloadURL(self, idpackage, url)
Set download URL prefix for package.
source code
 
setCategory(self, idpackage, category)
Set category name for package.
source code
 
setCategoryDescription(self, category, description_data)
Set description for given category name.
source code
 
setName(self, idpackage, name)
Set name for package.
source code
 
setDependency(self, iddependency, dependency)
Set dependency string for iddependency (dependency identifier).
source code
 
setAtom(self, idpackage, atom)
Set atom string for package.
source code
 
setSlot(self, idpackage, slot)
Set slot string for package.
source code
 
removeLicensedata(self, license_name)
Remove license text for given license name identifier.
source code
 
removeDependencies(self, idpackage)
Remove all the dependencies of package.
source code
 
insertDependencies(self, idpackage, depdata)
Insert dependencies for package.
source code
 
insertManualDependencies(self, idpackage, manual_deps)
Insert manually added dependencies to dep.
source code
 
removeContent(self, idpackage)
Remove content metadata for package.
source code
 
insertContent(self, idpackage, content, already_formatted=False)
Insert content metadata for package.
source code
 
insertNeededPaths(self, library, paths)
Insert paths where given ELF obj (library) name can be located.
source code
 
insertAutomergefiles(self, idpackage, automerge_data)
Insert configuration files automerge information for package.
source code
 
removeAutomergefiles(self, idpackage)
Remove configuration files automerge information for package.
source code
 
removeSignatures(self, idpackage)
Remove extra package file hashes (SHA1, SHA256, SHA512) for package.
source code
 
removeSpmPhases(self, idpackage)
Remove Source Package Manager phases for package.
source code
 
insertChangelog(self, category, name, changelog_txt)
Insert package changelog for package (in this case using category + name as key).
source code
 
removeChangelog(self, category, name)
Remove ChangeLog for package (in this case using category + name as key)
source code
 
insertLicenses(self, licenses_data)
insert license data (license names and text) into repository.
source code
 
insertConfigProtect(self, idpackage, idprotect, mask=False)
Insert CONFIG_PROTECT (configuration files protection) entry identifier for package.
source code
 
insertMirrors(self, mirrors)
Insert list of "mirror name" and "mirror list" into repository.
source code
 
insertKeywords(self, idpackage, keywords)
Insert keywords for package.
source code
 
insertUseflags(self, idpackage, useflags)
Insert Source Package Manager USE (components build) flags for package.
source code
 
insertSignatures(self, idpackage, sha1, sha256, sha512)
Insert package file extra hashes (sha1, sha256, sha512) for package.
source code
 
insertSpmPhases(self, idpackage, phases)
Insert Source Package Manager phases for package.
source code
 
insertSources(self, idpackage, sources)
Insert source code package download URLs for idpackage.
source code
 
insertConflicts(self, idpackage, conflicts)
Insert dependency conflicts for package.
source code
 
insertMessages(self, idpackage, messages)
Insert user messages for package.
source code
 
insertProvide(self, idpackage, provides)
docstring_title
source code
 
insertNeeded(self, idpackage, neededs)
docstring_title
source code
 
insertEclasses(self, idpackage, eclasses)
docstring_title
source code
 
insertOnDiskSize(self, idpackage, mysize)
docstring_title
source code
 
insertTrigger(self, idpackage, trigger)
docstring_title
source code
 
insertBranchMigration(self, repository, from_branch, to_branch, post_migration_md5sum, post_upgrade_md5sum) source code
 
setBranchMigrationPostUpgradeMd5sum(self, repository, from_branch, to_branch, post_upgrade_md5sum) source code
 
insertPortageCounter(self, idpackage, counter, branch, injected)
docstring_title
source code
 
insertCounter(self, idpackage, counter, branch=None)
docstring_title
source code
 
setTrashedCounter(self, counter)
docstring_title
source code
 
setCounter(self, idpackage, counter, branch=None)
docstring_title
source code
 
contentDiff(self, idpackage, dbconn, dbconn_idpackage)
docstring_title
source code
 
doCleanups(self)
docstring_title
source code
 
cleanupUseflags(self)
docstring_title
source code
 
cleanupSources(self)
docstring_title
source code
 
cleanupEclasses(self)
docstring_title
source code
 
cleanupNeeded(self)
docstring_title
source code
 
cleanupNeededPaths(self)
docstring_title
source code
 
cleanupDependencies(self)
docstring_title
source code
 
cleanupChangelogs(self)
docstring_title
source code
 
getNewNegativeCounter(self)
docstring_title
source code
 
getApi(self)
docstring_title
source code
 
getCategory(self, idcategory) source code
 
get_category_description_from_disk(self, category)
docstring_title
source code
 
getIDPackage(self, atom, branch=None)
docstring_title
source code
 
getIDPackageFromDownload(self, download_relative_path, endswith=False) source code
 
getIDPackagesFromFile(self, file) source code
 
getIDCategory(self, category)
docstring_title
source code
 
getVersioningData(self, idpackage)
docstring_title
source code
 
getStrictData(self, idpackage) source code
 
getStrictScopeData(self, idpackage) source code
 
getScopeData(self, idpackage) source code
 
getBaseData(self, idpackage) source code
 
getTriggerInfo(self, idpackage, content=True)
docstring_title
source code
 
getPackageData(self, idpackage, get_content=True, content_insert_formatted=False, trigger_unicode=True) source code
 
fetchall2set(self, item)
docstring_title
source code
 
fetchall2list(self, item)
docstring_title
source code
 
fetchone2list(self, item)
docstring_title
source code
 
fetchone2set(self, item)
docstring_title
source code
 
clearCache(self, depends=False)
docstring_title
source code
 
retrieveRepositoryUpdatesDigest(self, repository)
docstring_title
source code
 
listAllTreeUpdatesActions(self, no_ids_repos=False)
docstring_title
source code
 
retrieveTreeUpdatesActions(self, repository, forbranch=None)
docstring_title
source code
 
bumpTreeUpdatesActions(self, updates)
docstring_title
source code
 
removeTreeUpdatesActions(self, repository)
docstring_title
source code
 
insertTreeUpdatesActions(self, updates, repository)
docstring_title
source code
 
setRepositoryUpdatesDigest(self, repository, digest)
docstring_title
source code
 
addRepositoryUpdatesActions(self, repository, actions, branch)
docstring_title
source code
 
doesTreeupdatesActionExist(self, repository, command, branch) source code
 
clearPackageSets(self)
docstring_title
source code
 
insertPackageSets(self, sets_data)
docstring_title
source code
 
retrievePackageSets(self)
docstring_title
source code
 
retrievePackageSet(self, setname)
docstring_title
source code
 
retrieveSystemPackages(self)
docstring_title
source code
 
retrieveAtom(self, idpackage)
docstring_title
source code
 
retrieveBranch(self, idpackage)
docstring_title
source code
 
retrieveTrigger(self, idpackage, get_unicode=False)
docstring_title
source code
 
retrieveDownloadURL(self, idpackage)
docstring_title
source code
 
retrieveDescription(self, idpackage)
docstring_title
source code
 
retrieveHomepage(self, idpackage)
docstring_title
source code
 
retrieveCounter(self, idpackage) source code
 
retrieveMessages(self, idpackage)
docstring_title
source code
 
retrieveSize(self, idpackage)
docstring_title
source code
 
retrieveOnDiskSize(self, idpackage)
docstring_title
source code
 
retrieveDigest(self, idpackage)
docstring_title
source code
 
retrieveSignatures(self, idpackage)
docstring_title
source code
 
retrieveName(self, idpackage)
docstring_title
source code
 
retrieveKeySlot(self, idpackage)
docstring_title
source code
 
retrieveKeySlotAggregated(self, idpackage)
docstring_title
source code
 
retrieveKeySlotTag(self, idpackage)
docstring_title
source code
 
retrieveVersion(self, idpackage)
docstring_title
source code
 
retrieveRevision(self, idpackage)
docstring_title
source code
 
retrieveDateCreation(self, idpackage)
docstring_title
source code
 
retrieveApi(self, idpackage)
docstring_title
source code
 
retrieveUseflags(self, idpackage)
docstring_title
source code
 
retrieveEclasses(self, idpackage)
docstring_title
source code
 
retrieveSpmPhases(self, idpackage)
docstring_title
source code
 
retrieveNeededRaw(self, idpackage)
docstring_title
source code
 
retrieveNeeded(self, idpackage, extended=False, format=False)
docstring_title
source code
 
retrieveNeededPaths(self, idpackage)
docstring_title
source code
 
retrieveNeededLibraryPaths(self, needed_library_name, elfclass)
docstring_title
source code
 
retrieveNeededLibraryIdpackages(self)
docstring_title
source code
 
clearNeededLibraryIdpackages(self)
docstring_title
source code
 
setNeededLibraryIdpackages(self, library_map)
docstring_title
source code
 
retrieveConflicts(self, idpackage)
docstring_title
source code
 
retrieveProvide(self, idpackage)
docstring_title
source code
 
retrieveDependenciesList(self, idpackage) source code
 
retrievePostDependencies(self, idpackage, extended=False)
docstring_title
source code
 
retrieveManualDependencies(self, idpackage, extended=False)
docstring_title
source code
 
retrieveDependencies(self, idpackage, extended=False, deptype=None, exclude_deptypes=None)
docstring_title
source code
 
retrieveIdDependencies(self, idpackage)
docstring_title
source code
 
retrieveDependencyFromIddependency(self, iddependency)
docstring_title
source code
 
retrieveKeywords(self, idpackage)
docstring_title
source code
 
retrieveProtect(self, idpackage)
docstring_title
source code
 
retrieveProtectMask(self, idpackage)
docstring_title
source code
 
retrieveSources(self, idpackage, extended=False)
docstring_title
source code
 
retrieveAutomergefiles(self, idpackage, get_dict=False)
docstring_title
source code
 
retrieveContent(self, idpackage, extended=False, contentType=None, formatted=False, insert_formatted=False, order_by='')
docstring_title
source code
 
retrieveChangelog(self, idpackage)
docstring_title
source code
 
retrieveChangelogByKey(self, category, name)
docstring_title
source code
 
retrieveSlot(self, idpackage)
docstring_title
source code
 
retrieveVersionTag(self, idpackage)
docstring_title
source code
 
retrieveMirrorInfo(self, mirrorname)
docstring_title
source code
 
retrieveCategory(self, idpackage) source code
 
retrieveCategoryDescription(self, category)
docstring_title
source code
 
retrieveLicensedata(self, idpackage)
docstring_title
source code
 
retrieveLicensedataKeys(self, idpackage)
docstring_title
source code
 
retrieveLicenseText(self, license_name)
docstring_title
source code
 
retrieveLicense(self, idpackage)
docstring_title
source code
 
retrieveCompileFlags(self, idpackage)
docstring_title
source code
 
retrieveDepends(self, idpackage, atoms=False, key_slot=False, exclude_deptypes=None)
docstring_title
source code
 
retrieveUnusedIdpackages(self)
docstring_title
source code
 
isPackageAvailable(self, pkgatom)
docstring_title
source code
 
isIDPackageAvailable(self, idpackage)
docstring_title
source code
 
areIDPackagesAvailable(self, idpackages)
docstring_title
source code
 
isCategoryAvailable(self, category)
docstring_title
source code
 
isProtectAvailable(self, protect)
docstring_title
source code
 
isFileAvailable(self, myfile, get_id=False)
docstring_title
source code
 
resolveNeeded(self, needed, elfclass=-1, extended=False)
docstring_title
source code
 
isSourceAvailable(self, source)
docstring_title
source code
 
isDependencyAvailable(self, dependency)
docstring_title
source code
 
isKeywordAvailable(self, keyword)
docstring_title
source code
 
isUseflagAvailable(self, useflag)
docstring_title
source code
 
isEclassAvailable(self, eclass)
docstring_title
source code
 
isNeededAvailable(self, needed)
docstring_title
source code
 
isCounterAvailable(self, counter, branch=None, branch_operator='=')
docstring_title
source code
 
isCounterTrashed(self, counter)
docstring_title
source code
 
isLicensedataKeyAvailable(self, license_name)
docstring_title
source code
 
isLicenseAccepted(self, license_name)
docstring_title
source code
 
acceptLicense(self, license_name)
docstring_title
source code
 
isLicenseAvailable(self, pkglicense)
docstring_title
source code
 
isSystemPackage(self, idpackage)
docstring_title
source code
 
isInjected(self, idpackage)
docstring_title
source code
 
areCompileFlagsAvailable(self, chost, cflags, cxxflags)
docstring_title
source code
 
searchBelongs(self, file, like=False, branch=None, branch_operator='=')
docstring_title
source code
 
searchEclassedPackages(self, eclass, atoms=False) source code
 
searchTaggedPackages(self, tag, atoms=False) source code
 
searchLicenses(self, mylicense, caseSensitive=False, atoms=False)
docstring_title
source code
 
searchSlottedPackages(self, slot, atoms=False) source code
 
searchKeySlot(self, key, slot, branch=None)
docstring_title
source code
 
searchNeeded(self, keyword, like=False)
docstring_title
source code
 
searchDependency(self, dep, like=False, multi=False, strings=False)
docstring_title
source code
 
searchIdpackageFromIddependency(self, iddep)
docstring_title
source code
 
searchSets(self, keyword)
docstring_title
source code
 
searchSimilarPackages(self, mystring, atom=False)
docstring_title
source code
 
searchPackages(self, keyword, sensitive=False, slot=None, tag=None, branch=None, order_by='atom', just_id=False)
docstring_title
source code
 
searchProvide(self, keyword, slot=None, tag=None, branch=None, justid=False)
docstring_title
source code
 
searchPackagesByDescription(self, keyword) source code
 
searchPackagesByName(self, keyword, sensitive=False, branch=None, justid=False)
docstring_title
source code
 
searchPackagesByCategory(self, keyword, like=False, branch=None)
docstring_title
source code
 
searchPackagesByNameAndCategory(self, name, category, sensitive=False, branch=None, justid=False)
docstring_title
source code
 
isPackageScopeAvailable(self, atom, slot, revision)
docstring_title
source code
tuple
isBranchMigrationAvailable(self, repository, from_branch, to_branch)
Returns whether branch migration metadata given by the provided key (repository, from_branch, to_branch,) is available.
source code
 
listAllPackages(self, get_scope=False, order_by=None, branch=None, branch_operator='=')
docstring_title
source code
 
listAllInjectedPackages(self, justFiles=False)
docstring_title
source code
 
listAllCounters(self, onlycounters=False, branch=None, branch_operator='=')
docstring_title
source code
 
listAllIdpackages(self, branch=None, branch_operator='=', order_by=None)
docstring_title
source code
 
listAllDependencies(self, only_deps=False)
docstring_title
source code
 
listAllBranches(self)
docstring_title
source code
 
listIdPackagesInIdcategory(self, idcategory, order_by='atom')
docstring_title
source code
 
listIdpackageDependencies(self, idpackage) source code
 
listAllDownloads(self, do_sort=True, full_path=False)
docstring_title
source code
 
listAllFiles(self, clean=False, count=False)
docstring_title
source code
 
listAllCategories(self, order_by='')
docstring_title
source code
 
listConfigProtectDirectories(self, mask=False)
docstring_title
source code
 
switchBranch(self, idpackage, tobranch) source code
 
databaseStructureUpdates(self)
docstring_title
source code
 
validateDatabase(self)
docstring_title
source code
 
getIdpackagesDifferences(self, foreign_idpackages)
docstring_title
source code
 
uniformBranch(self, branch)
docstring_title
source code
 
alignDatabases(self, dbconn, force=False, output_header=' ', align_limit=300)
docstring_title
source code
 
checkDatabaseApi(self)
docstring_title
source code
 
doDatabaseImport(self, dumpfile, dbfile)
docstring_title
source code
 
doDatabaseExport(self, dumpfile, gentle_with_tables=True, exclude_tables=None) source code
 
listAllTables(self) source code
 
doesTableExist(self, table)
docstring_title
source code
 
doesColumnInTableExist(self, table, column)
docstring_title
source code
 
database_checksum(self, do_order=False, strict=True, strings=False)
docstring_title
source code
 
updateInstalledTableSource(self, idpackage, source)
docstring_title
source code
 
addPackageToInstalledTable(self, idpackage, repoid, source=0)
docstring_title
source code
 
retrievePackageFromInstalledTable(self, idpackage)
docstring_title
source code
 
removePackageFromInstalledTable(self, idpackage)
docstring_title
source code
 
removePackageFromDependsTable(self, idpackage)
docstring_title
source code
 
createDependsTable(self)
docstring_title
source code
 
sanitizeDependsTable(self)
docstring_title
source code
 
isDependsTableSane(self)
docstring_title
source code
 
createXpakTable(self)
docstring_title
source code
 
storeXpakMetadata(self, idpackage, blob)
docstring_title
source code
 
retrieveXpakMetadata(self, idpackage)
docstring_title
source code
dict
retrieveBranchMigration(self, to_branch)
This method returns branch migration metadata stored in Entropy Client database (installed packages database).
source code
 
dropContent(self)
docstring_title
source code
 
dropAllIndexes(self)
docstring_title
source code
 
listAllIndexes(self, only_entropy=True)
docstring_title
source code
 
createAllIndexes(self)
docstring_title
source code
 
createPackagesetsIndex(self)
docstring_title
source code
 
createNeededlibraryidpackagesIndex(self)
docstring_title
source code
 
createNeededlibrarypathsIndex(self)
docstring_title
source code
 
createAutomergefilesIndex(self)
docstring_title
source code
 
createNeededIndex(self)
docstring_title
source code
 
createMessagesIndex(self)
docstring_title
source code
 
createCompileFlagsIndex(self)
docstring_title
source code
 
createUseflagsIndex(self)
docstring_title
source code
 
dropContentIndex(self, only_file=False)
docstring_title
source code
 
createContentIndex(self)
docstring_title
source code
 
createConfigProtectReferenceIndex(self)
docstring_title
source code
 
createBaseinfoIndex(self)
docstring_title
source code
 
createLicensedataIndex(self)
docstring_title
source code
 
createLicensesIndex(self)
docstring_title
source code
 
createCategoriesIndex(self)
docstring_title
source code
 
createKeywordsIndex(self)
docstring_title
source code
 
createDependenciesIndex(self)
docstring_title
source code
 
createCountersIndex(self)
docstring_title
source code
 
createSourcesIndex(self)
docstring_title
source code
 
createProvideIndex(self)
docstring_title
source code
 
createConflictsIndex(self)
docstring_title
source code
 
createExtrainfoIndex(self)
docstring_title
source code
 
createEclassesIndex(self)
docstring_title
source code
 
regenerateCountersTable(self, vdb_path, output=False)
docstring_title
source code
 
clearTreeupdatesEntries(self, repository)
docstring_title
source code
 
resetTreeupdatesDigests(self)
docstring_title
source code
 
migrateCountersTable(self)
docstring_title
source code
 
createNeededlibrarypathsTable(self)
docstring_title
source code
 
createNeededlibraryidpackagesTable(self)
docstring_title
source code
 
createInstalledTableSource(self)
docstring_title
source code
 
createPackagechangelogsTable(self)
docstring_title
source code
 
createAutomergefilesTable(self)
docstring_title
source code
 
createPackagesignaturesTable(self)
docstring_title
source code
 
createPackagespmphases(self)
docstring_title
source code
 
createEntropyBranchMigrationTable(self)
docstring_title
source code
 
createPackagesetsTable(self)
docstring_title
source code
 
createCategoriesdescriptionTable(self)
docstring_title
source code
 
createTreeupdatesTable(self)
docstring_title
source code
 
createLicensedataTable(self)
docstring_title
source code
 
createLicensesAcceptedTable(self)
docstring_title
source code
 
createInstalledTable(self)
docstring_title
source code
 
addDependsRelationToDependsTable(self, iterable)
docstring_title
source code
 
clearDependsTable(self)
docstring_title
source code
 
regenerateDependsTable(self, output=True)
docstring_title
source code
 
regenerateLibrarypathsidpackageTable(self, output=True)
docstring_title
source code
 
moveCountersToBranch(self, to_branch, from_branch=None)
docstring_title
source code
 
atomMatchFetchCache(self, *args)
docstring_title
source code
 
atomMatchStoreCache(self, *args, **kwargs)
docstring_title
source code
 
atomMatchValidateCache(self, cached_obj, multiMatch, extendedResults)
docstring_title
source code
 
idpackageValidator(self, idpackage, live=True)
docstring_title
source code
 
packagesFilter(self, results)
docstring_title
source code
 
atomMatch(self, atom, caseSensitive=True, matchSlot=None, multiMatch=False, matchBranches=(), matchTag=None, matchUse=(), packagesFilter=True, matchRevision=None, extendedResults=False, useCache=True) source code
Method Details

__init__(self, readOnly=False, noUpload=False, dbFile=None, clientDatabase=False, xcache=False, dbname='etpdb:', indexing=True, OutputInterface=None, skipChecks=False, useBranch=None, lockRemote=True)
(Constructor)

source code 

EntropyRepository constructor.

Parameters:
  • readOnly (bool) - open file in read-only mode
  • noUpload (bool) - server-side setting for not allowing database uploads when remote revision is lower than local
  • dbFile (string) - path to database to open
  • clientDatabase (bool) - state that EntropyRepository instance is a client-side one
  • xcache (bool) - enable on-disk cache
  • dbname (string) - EntropyRepository instance identifier
  • indexing (bool) - enable database indexes
  • OutputInterface (entropy.output.TextInterface based instance) - interface used to communicate with the user. must inherit entropy.output.TextInterface
  • skipChecks (bool) - if True, skip integrity checks
  • useBranch (string) - if True, it won't use SystemSettings' branch setting but rather the one provided
  • lockRemote (bool) - determine whether remote server-side database should be locked when updating the local version

setCacheSize(self, size)

source code 

Change low-level, storage engine based cache size.

Parameters:
  • size (int) - new size

setDefaultCacheSize(self, size)

source code 

Change default low-level, storage engine based cache size.

Parameters:
  • size (int) - new default size

closeDB(self)

source code 

Close repository storage communication. Note: once issues this, you won't be able to use such instance anymore.

isDatabaseTainted(self)

source code 

Server-side function used to determine whether repository database has been modified.

Returns: bool
taint status

initializeDatabase(self)

source code 

WARNING: it will erase your database. This method (re)initialize the repository, dropping all its content.

filterTreeUpdatesActions(self, actions)

source code 

This method should be considered internal and not suited for general audience. Given a raw package name/slot updates list, it returns the action that should be really taken because not applied.

Parameters:
  • actions (list) - list of raw treeupdates actions, for example: ['move x11-foo/bar app-foo/bar', 'slotmove x11-foo/bar 2 3']
Returns: list
list of raw treeupdates actions that should be really worked out

runTreeUpdatesActions(self, actions)

source code 

docstring_title

Parameters:
  • actions ()

runTreeUpdatesMoveAction(self, move_command, quickpkg_queue)

source code 

docstring_title

Parameters:
  • move_command ()
  • quickpkg_queue ()

runTreeUpdatesSlotmoveAction(self, slotmove_command, quickpkg_queue)

source code 

docstring_title

Parameters:
  • slotmove_command ()
  • quickpkg_queue ()

doTreeupdatesSpmCleanup(self, spm_moves)

source code 

Erase dead Source Package Manager db entries.

Parameters:
  • spm_moves (list) - list of raw package name/slot update actions.

To Do: make more Portage independent (create proper entropy.spm methods for dealing with this)

handlePackage(self, etpData, forcedRevision=-1, formattedContent=False)

source code 

Update or add a package to repository automatically handling
its scope and thus removal of previous versions if requested by
the given metadata.
etpData is a dict() containing all the information bound to
a package:

    {
        'signatures':
            {
                'sha256': u'zzz',
                'sha1': u'zzz',
                'sha512': u'zzz'
         },
        'slot': u'0',
        'datecreation': u'1247681752.93',
        'description': u'Standard (de)compression library',
        'useflags': set([u'kernel_linux']),
        'eclasses': set([u'multilib']),
        'config_protect_mask': u'string string', 'etpapi': 3,
        'mirrorlinks': [],
        'cxxflags': u'-Os -march=x86-64 -pipe',
        'injected': False,
        'licensedata': {u'ZLIB': u"lictext"},
        'dependencies': {},
        'chost': u'x86_64-pc-linux-gnu',
        'config_protect': u'string string',
        'download': u'packages/amd64/4/sys-libs:zlib-1.2.3-r1.tbz2',
        'conflicts': set([]),
        'digest': u'fd54248ae060c287b1ec939de3e55332',
        'size': u'136302',
        'category': u'sys-libs',
        'license': u'ZLIB',
        'needed_paths': {},
        'sources': set(),
        'name': u'zlib',
        'versiontag': u'',
        'changelog': u"text",
        'provide': set([]),
        'trigger': u'text',
        'counter': 22331,
        'messages': [],
        'branch': u'4',
        'content': {},
        'needed': [(u'libc.so.6', 2)],
        'version': u'1.2.3-r1',
        'keywords': set(),
        'cflags': u'-Os -march=x86-64 -pipe',
        'disksize': 932206, 'spm_phases': None,
        'homepage': u'http://www.zlib.net/',
        'systempackage': True,
        'revision': 0
    }

@param etpData: Entropy package metadata dict
@type etpData: dict
@keyword forcedRevision: force a specific package revision
@type forcedRevision: int
@keyword formattedContent: tells whether content metadata is already
    formatted for insertion
@type formattedContent: bool
@return: tuple composed by
    - idpackage: unique Entropy Repository package identifier
    - revision: final package revision selected
    - etpData: new Entropy package metadata dict
@rtype: tuple

retrieve_packages_to_remove(self, name, category, slot, injected)

source code 

Return a list of packages that would be removed given name, category, slot and injection status.

Parameters:
  • name (string) - package name
  • category (string) - package category
  • slot (string) - package slot
  • injected (bool) - injection status (packages marked as injected are always considered not automatically removable)
Returns: set
list (set) of removable packages (idpackages)

addPackage(self, etpData, revision=-1, idpackage=None, do_commit=True, formatted_content=False)

source code 

Add package to this Entropy repository. The main difference between handlePackage and this is that from here, no packages are going to be removed, in any case. For more information about etpData layout, please see handlePackage().

Parameters:
  • etpData (dict) - Entropy package metadata
  • revision (int) - force a specific Entropy package revision
  • idpackage (int) - 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.
  • do_commit (bool) - if True, automatically commits the executed transaction (could cause slowness)
  • formatted_content (bool) - if True, determines whether the content metadata (usually the biggest part) in etpData is already prepared for insertion
Returns: tuple
tuple composed by
  • idpackage: unique Entropy Repository package identifier
  • revision: final package revision selected
  • etpData: new Entropy package metadata dict

removePackage(self, idpackage, do_cleanup=True, do_commit=True, do_rss=True)

source code 

Remove package from this Entropy repository using it's identifier (idpackage).

Parameters:
  • idpackage (int) - Entropy repository package indentifier
  • do_cleanup (bool) - if True, executes repository metadata cleanup at the end
  • do_commit (bool) - if True, commits the transaction (could cause slowness)
  • do_rss (bool) - triggered only for server-side repositories, if True, generates information about the removal in RSS form, dumping data to cache (used internally to handle RSS support for repositories).

removeMirrorEntries(self, mirrorname)

source code 

Remove source packages mirror entries from database for the given mirror name. This is a representation of Portage's "thirdpartymirrors".

Parameters:
  • mirrorname (string) - mirror name

addMirrors(self, mirrorname, mirrorlist)

source code 

Add source package mirror entry to database. This is a representation of Portage's "thirdpartymirrors".

Parameters:
  • mirrorname (string) - name of the mirror from which "mirrorlist" belongs
  • mirrorlist (list) - list of URLs belonging to the given mirror name

addCategory(self, category)

source code 

Add package category string to repository. Return its identifier (idcategory).

Parameters:
  • category (string) - name of the category to add
Returns: int
category identifier (idcategory)

addProtect(self, protect)

source code 

Add a single, generic CONFIG_PROTECT (not defined as _MASK/whatever here) path. Return its identifier (idprotect).

Parameters:
  • protect (string) - CONFIG_PROTECT path to add
Returns: int
protect identifier (idprotect)

addSource(self, source)

source code 

Add source code package download path to repository. Return its identifier (idsource).

Parameters:
  • source (string) - source package download path
Returns: int
source identifier (idprotect)

addDependency(self, dependency)

source code 

Add dependency string to repository. Return its identifier (iddependency).

Parameters:
  • dependency (string) - dependency string
Returns: int
dependency identifier (iddependency)

addKeyword(self, keyword)

source code 

Add package SPM keyword string to repository. Return its identifier (idkeyword).

Parameters:
  • keyword (string) - keyword string
Returns: int
keyword identifier (idkeyword)

addUseflag(self, useflag)

source code 

Add package USE flag string to repository. Return its identifier (iduseflag).

Parameters:
  • useflag (string) - useflag string
Returns: int
useflag identifier (iduseflag)

addEclass(self, eclass)

source code 

Add package SPM Eclass string to repository. Return its identifier (ideclass).

Parameters:
  • eclass (string) - eclass string
Returns: int
eclass identifier (ideclass)

addNeeded(self, needed)

source code 

Add package libraries' ELF object NEEDED string to repository. Return its identifier (idneeded).

Parameters:
  • needed (string) - NEEDED string (as shown in `readelf -d elf.so`)
Returns: int
needed identifier (idneeded)

addLicense(self, pkglicense)

source code 

Add package license name string to repository. Return its identifier (idlicense).

Parameters:
  • pkglicense (string) - license name string
Returns: int
license name identifier (idlicense)

addCompileFlags(self, chost, cflags, cxxflags)

source code 

Add package Compiler flags used to repository. Return its identifier (idflags).

Parameters:
  • chost (string) - CHOST string
  • cflags (string) - CFLAGS string
  • cxxflags (string) - CXXFLAGS string
Returns: int
Compiler flags triple identifier (idflags)

setSystemPackage(self, idpackage, do_commit=True)

source code 

Mark a package as system package, which means that entropy.client will deny its removal.

Parameters:
  • idpackage (int) - package identifier
  • do_commit (bool) - determine whether executing commit or not

setInjected(self, idpackage, do_commit=True)

source code 

Mark package as injected, injection is usually set for packages manually added to repository. Injected packages are not removed automatically even when featuring conflicting scope with other that are being added. If a package is injected, it means that maintainers have to handle it manually.

Parameters:
  • idpackage (int) - package indentifier
  • do_commit (bool) - determine whether executing commit or not

setDateCreation(self, idpackage, date)

source code 

Update the creation date for package. Creation date is stored in string based unix time format.

Parameters:
  • idpackage (int) - package indentifier
  • date (string) - unix time in string form

setDigest(self, idpackage, digest)

source code 

Set package file md5sum for package. This information is used by entropy.client when downloading packages.

Parameters:
  • idpackage (int) - package indentifier
  • digest (string) - md5 hash for package file

setSignatures(self, idpackage, sha1, sha256, sha512)

source code 

Set package file extra hashes (sha1, sha256, sha512) for package.

Parameters:
  • idpackage (int) - package indentifier
  • sha1 (string) - SHA1 hash for package file
  • sha256 (string) - SHA256 hash for package file
  • sha512 (string) - SHA512 hash for package file

setDownloadURL(self, idpackage, url)

source code 

Set download URL prefix for package.

Parameters:
  • idpackage (int) - package indentifier
  • url (string) - URL prefix to set

setCategory(self, idpackage, category)

source code 

Set category name for package.

Parameters:
  • idpackage (int) - package indentifier
  • category (string) - category to set

setCategoryDescription(self, category, description_data)

source code 

Set description for given category name.

Parameters:
  • category (string) - category name
  • description_data (dict) - category description for several locales. {'en': "This is blah", 'it': "Questo e' blah", ... }

setName(self, idpackage, name)

source code 

Set name for package.

Parameters:
  • idpackage (int) - package indentifier
  • name (string) - package name

setDependency(self, iddependency, dependency)

source code 

Set dependency string for iddependency (dependency identifier).

Parameters:
  • iddependency (int) - dependency string identifier
  • dependency (string) - dependency string

setAtom(self, idpackage, atom)

source code 

Set atom string for package. "Atom" is the full, unique name of a package.

Parameters:
  • idpackage (int) - package indentifier
  • atom (string) - atom string

setSlot(self, idpackage, slot)

source code 

Set slot string for package. Please refer to Portage SLOT documentation for more info.

Parameters:
  • idpackage (int) - package indentifier
  • slot (string) - slot string

removeLicensedata(self, license_name)

source code 

Remove license text for given license name identifier.

Parameters:
  • license_name (string) - available license name identifier

removeDependencies(self, idpackage)

source code 

Remove all the dependencies of package.

Parameters:
  • idpackage (int) - package indentifier

insertDependencies(self, idpackage, depdata)

source code 

Insert dependencies for package. "depdata" is a dict() with dependency strings as keys and dependency type as values.

Parameters:
  • idpackage (int) - package indentifier
  • depdata (dict) - dependency dictionary {'app-foo/foo': dep_type_integer, ...}

insertManualDependencies(self, idpackage, manual_deps)

source code 

Insert manually added dependencies to dep. list of package.

Parameters:
  • idpackage (int) - package indentifier
  • manual_deps (list) - list of dependency strings

removeContent(self, idpackage)

source code 

Remove content metadata for package.

Parameters:
  • idpackage (int) - package indentifier

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

source code 

Insert content metadata for package. "content" can either be a dict() or a list of triples (tuples of length 3, (idpackage, path, type,)).

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

insertNeededPaths(self, library, paths)

source code 

Insert paths where given ELF obj (library) name can be located. "library" is an ELF object name.

Parameters:
  • library (string) - library name
  • paths (list) - list of paths (list of strings)

insertAutomergefiles(self, idpackage, automerge_data)

source code 

Insert configuration files automerge information for package. "automerge_data" contains configuration files paths and their belonging md5 hash. This features allows entropy.client to "auto-merge" or "auto-remove" configuration files never touched by user.

Parameters:
  • idpackage (int) - package indentifier
  • automerge_data (list) - list of tuples of length 2. [('/path/to/conf/file', 'md5_checksum_string',) ... ]

removeAutomergefiles(self, idpackage)

source code 

Remove configuration files automerge information for package. "automerge_data" contains configuration files paths and their belonging md5 hash. This features allows entropy.client to "auto-merge" or "auto-remove" configuration files never touched by user.

Parameters:
  • idpackage (int) - package indentifier

removeSignatures(self, idpackage)

source code 

Remove extra package file hashes (SHA1, SHA256, SHA512) for package.
Entropy package files metadata contains up to 4 hashes:
    md5, sha1, sha256, sha512
While md5 is here for historical reasons (being the first supported)
sha1, sha256, sha512 have been added recently and located into a
separate database table called "packagesignatures". Such hashes
can be not available for older packages, so don't be scared, aliens
are not to blame.

@param idpackage: package indentifier
@type idpackage: int

removeSpmPhases(self, idpackage)

source code 

Remove Source Package Manager phases for package. Entropy can call several Source Package Manager (the PM which Entropy relies on) package installation/removal phases. Such phase names are listed here.

Parameters:
  • idpackage (int) - package indentifier

insertChangelog(self, category, name, changelog_txt)

source code 

Insert package changelog for package (in this case using category + name as key).

Parameters:
  • category (string) - package category
  • name (string) - package name
  • changelog_txt (string) - changelog text

removeChangelog(self, category, name)

source code 

Remove ChangeLog for package (in this case using category + name as key)

Parameters:
  • category (string) - package category
  • name (string) - package name

insertLicenses(self, licenses_data)

source code 

insert license data (license names and text) into repository.

Parameters:
  • licenses_data (dict) - dictionary containing license names as keys and text as values

insertConfigProtect(self, idpackage, idprotect, mask=False)

source code 

Insert CONFIG_PROTECT (configuration files protection) entry identifier for package. This entry is usually a space separated string of directory and files which are used to handle user-protected configuration files or directories, those that are going to be stashed in separate paths waiting for user merge decisions.

Parameters:
  • idpackage (int) - package indentifier
  • idprotect (int) - configuration files protection identifier
  • mask (bool) - if True, idproctect will be considered a "mask" entry, meaning that configuration files starting with paths referenced by idprotect will be forcefully merged.

insertMirrors(self, mirrors)

source code 

Insert list of "mirror name" and "mirror list" into repository. The term "mirror" in this case references to Source Package Manager package download mirrors. Argument format is like this for historical reasons and may change in future.

Parameters:
  • mirrors (list) - list of tuples of length 2 containing string as first item and list as second. [('openoffice', ['http://openoffice1', 'http://..."],), ...]

To Do: change argument format

insertKeywords(self, idpackage, keywords)

source code 

Insert keywords for package. Keywords are strings contained in package metadata stating what architectures or subarchitectures are supported by package. It is historically used also for masking packages (making them not available).

Parameters:
  • idpackage (int) - package indentifier
  • keywords (list) - list of keywords

insertUseflags(self, idpackage, useflags)

source code 

Insert Source Package Manager USE (components build) flags for package.

Parameters:
  • idpackage (int) - package indentifier
  • useflags (list) - list of use flags strings

insertSignatures(self, idpackage, sha1, sha256, sha512)

source code 

Insert package file extra hashes (sha1, sha256, sha512) for package.

Parameters:
  • idpackage (int) - package indentifier
  • sha1 (string) - SHA1 hash for package file
  • sha256 (string) - SHA256 hash for package file
  • sha512 (string) - SHA512 hash for package file

insertSpmPhases(self, idpackage, phases)

source code 

Insert Source Package Manager phases for package. Entropy can call several Source Package Manager (the PM which Entropy relies on) package installation/removal phases. Such phase names are listed here.

Parameters:
  • idpackage (int) - package indentifier
  • phases (list) - list of available Source Package Manager phases

insertSources(self, idpackage, sources)

source code 

Insert source code package download URLs for idpackage.

Parameters:
  • idpackage (int) - package indentifier
  • sources (list) - list of source URLs

insertConflicts(self, idpackage, conflicts)

source code 

Insert dependency conflicts for package.

Parameters:
  • idpackage (int) - package indentifier
  • conflicts (list) - list of dep. conflicts

insertMessages(self, idpackage, messages)

source code 

Insert user messages for package.

Parameters:
  • idpackage (int) - package indentifier
  • messages (list) - list of messages

insertProvide(self, idpackage, provides)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • provides ()

insertNeeded(self, idpackage, neededs)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • neededs ()

insertEclasses(self, idpackage, eclasses)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • eclasses ()

insertOnDiskSize(self, idpackage, mysize)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • mysize ()

insertTrigger(self, idpackage, trigger)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • trigger ()

insertPortageCounter(self, idpackage, counter, branch, injected)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • counter ()
  • branch ()
  • injected ()

insertCounter(self, idpackage, counter, branch=None)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • counter ()
  • branch ()

setTrashedCounter(self, counter)

source code 

docstring_title

Parameters:
  • counter ()

setCounter(self, idpackage, counter, branch=None)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • counter ()
  • branch ()

contentDiff(self, idpackage, dbconn, dbconn_idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • dbconn ()
  • dbconn_idpackage ()

doCleanups(self)

source code 

docstring_title

cleanupUseflags(self)

source code 

docstring_title

cleanupSources(self)

source code 

docstring_title

cleanupEclasses(self)

source code 

docstring_title

cleanupNeeded(self)

source code 

docstring_title

cleanupNeededPaths(self)

source code 

docstring_title

cleanupDependencies(self)

source code 

docstring_title

cleanupChangelogs(self)

source code 

docstring_title

getNewNegativeCounter(self)

source code 

docstring_title

getApi(self)

source code 

docstring_title

get_category_description_from_disk(self, category)

source code 

docstring_title

Parameters:
  • category ()

getIDPackage(self, atom, branch=None)

source code 

docstring_title

Parameters:
  • atom ()
  • branch ()

getIDCategory(self, category)

source code 

docstring_title

Parameters:
  • category ()

getVersioningData(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

getTriggerInfo(self, idpackage, content=True)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • content ()

fetchall2set(self, item)

source code 

docstring_title

Parameters:
  • item ()

fetchall2list(self, item)

source code 

docstring_title

Parameters:
  • item ()

fetchone2list(self, item)

source code 

docstring_title

Parameters:
  • item ()

fetchone2set(self, item)

source code 

docstring_title

Parameters:
  • item ()

clearCache(self, depends=False)

source code 

docstring_title

Parameters:
  • depends ()

retrieveRepositoryUpdatesDigest(self, repository)

source code 

docstring_title

Parameters:
  • repository ()

listAllTreeUpdatesActions(self, no_ids_repos=False)

source code 

docstring_title

Parameters:
  • no_ids_repos ()

retrieveTreeUpdatesActions(self, repository, forbranch=None)

source code 

docstring_title

Parameters:
  • repository ()
  • forbranch ()

bumpTreeUpdatesActions(self, updates)

source code 

docstring_title

Parameters:
  • updates ()

removeTreeUpdatesActions(self, repository)

source code 

docstring_title

Parameters:
  • repository ()

insertTreeUpdatesActions(self, updates, repository)

source code 

docstring_title

Parameters:
  • updates ()
  • repository ()

setRepositoryUpdatesDigest(self, repository, digest)

source code 

docstring_title

Parameters:
  • repository ()
  • digest ()

addRepositoryUpdatesActions(self, repository, actions, branch)

source code 

docstring_title

Parameters:
  • repository ()
  • actions ()
  • branch ()

clearPackageSets(self)

source code 

docstring_title

insertPackageSets(self, sets_data)

source code 

docstring_title

Parameters:
  • sets_data ()

retrievePackageSets(self)

source code 

docstring_title

retrievePackageSet(self, setname)

source code 

docstring_title

Parameters:
  • setname ()

retrieveSystemPackages(self)

source code 

docstring_title

retrieveAtom(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveBranch(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveTrigger(self, idpackage, get_unicode=False)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • get_unicode ()

retrieveDownloadURL(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveDescription(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveHomepage(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveMessages(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveSize(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveOnDiskSize(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveDigest(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveSignatures(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveName(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveKeySlot(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveKeySlotAggregated(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveKeySlotTag(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveVersion(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveRevision(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveDateCreation(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveApi(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveUseflags(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveEclasses(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveSpmPhases(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage ()

retrieveNeededRaw(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveNeeded(self, idpackage, extended=False, format=False)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • extended ()
  • format ()

retrieveNeededPaths(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveNeededLibraryPaths(self, needed_library_name, elfclass)

source code 

docstring_title

Parameters:
  • needed_library_name ()
  • elfclass ()

retrieveNeededLibraryIdpackages(self)

source code 

docstring_title

clearNeededLibraryIdpackages(self)

source code 

docstring_title

setNeededLibraryIdpackages(self, library_map)

source code 

docstring_title

Parameters:
  • library_map ()

retrieveConflicts(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveProvide(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrievePostDependencies(self, idpackage, extended=False)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • extended ()

retrieveManualDependencies(self, idpackage, extended=False)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • extended ()

retrieveDependencies(self, idpackage, extended=False, deptype=None, exclude_deptypes=None)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveIdDependencies(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveDependencyFromIddependency(self, iddependency)

source code 

docstring_title

Parameters:
  • iddependency ()

retrieveKeywords(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveProtect(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveProtectMask(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveSources(self, idpackage, extended=False)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveAutomergefiles(self, idpackage, get_dict=False)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • get_dict ()

retrieveContent(self, idpackage, extended=False, contentType=None, formatted=False, insert_formatted=False, order_by='')

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveChangelog(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveChangelogByKey(self, category, name)

source code 

docstring_title

Parameters:
  • category ()
  • name ()

retrieveSlot(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveVersionTag(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveMirrorInfo(self, mirrorname)

source code 

docstring_title

Parameters:
  • mirrorname ()

retrieveCategoryDescription(self, category)

source code 

docstring_title

Parameters:
  • category ()

retrieveLicensedata(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveLicensedataKeys(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveLicenseText(self, license_name)

source code 

docstring_title

Parameters:
  • license_name ()

retrieveLicense(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveCompileFlags(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveDepends(self, idpackage, atoms=False, key_slot=False, exclude_deptypes=None)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

retrieveUnusedIdpackages(self)

source code 

docstring_title

isPackageAvailable(self, pkgatom)

source code 

docstring_title

Parameters:
  • pkgatom ()

isIDPackageAvailable(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

areIDPackagesAvailable(self, idpackages)

source code 

docstring_title

Parameters:
  • idpackages (list) - list of package indentifiers

isCategoryAvailable(self, category)

source code 

docstring_title

Parameters:
  • category ()

isProtectAvailable(self, protect)

source code 

docstring_title

Parameters:
  • protect ()

isFileAvailable(self, myfile, get_id=False)

source code 

docstring_title

Parameters:
  • myfile ()
  • get_id ()

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

source code 

docstring_title

Parameters:
  • needed ()
  • elfclass ()
  • extended ()

isSourceAvailable(self, source)

source code 

docstring_title

Parameters:
  • source ()

isDependencyAvailable(self, dependency)

source code 

docstring_title

Parameters:
  • dependency ()

isKeywordAvailable(self, keyword)

source code 

docstring_title

Parameters:
  • keyword ()

isUseflagAvailable(self, useflag)

source code 

docstring_title

Parameters:
  • useflag ()

isEclassAvailable(self, eclass)

source code 

docstring_title

Parameters:
  • eclass ()

isNeededAvailable(self, needed)

source code 

docstring_title

Parameters:
  • needed ()

isCounterAvailable(self, counter, branch=None, branch_operator='=')

source code 

docstring_title

Parameters:
  • counter ()
  • branch ()
  • branch_operator ()

isCounterTrashed(self, counter)

source code 

docstring_title

Parameters:
  • counter ()

isLicensedataKeyAvailable(self, license_name)

source code 

docstring_title

Parameters:
  • license_name ()

isLicenseAccepted(self, license_name)

source code 

docstring_title

Parameters:
  • license_name ()

acceptLicense(self, license_name)

source code 

docstring_title

Parameters:
  • license_name ()

isLicenseAvailable(self, pkglicense)

source code 

docstring_title

Parameters:
  • pkglicense ()

isSystemPackage(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage ()

isInjected(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier

areCompileFlagsAvailable(self, chost, cflags, cxxflags)

source code 

docstring_title

Parameters:
  • chost ()
  • cflags ()
  • cxxflags ()

searchBelongs(self, file, like=False, branch=None, branch_operator='=')

source code 

docstring_title

Parameters:
  • file ()
  • like ()
  • branch ()
  • branch_operator ()

searchLicenses(self, mylicense, caseSensitive=False, atoms=False)

source code 

docstring_title

Parameters:
  • mylicense ()
  • caseSensitive ()
  • atoms ()

searchKeySlot(self, key, slot, branch=None)

source code 

docstring_title

Parameters:
  • key ()
  • slot ()
  • branch ()

searchNeeded(self, keyword, like=False)

source code 

docstring_title

Parameters:
  • keyword ()
  • like ()

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

source code 

docstring_title

Parameters:
  • dep ()
  • like ()
  • multi ()
  • strings ()

searchIdpackageFromIddependency(self, iddep)

source code 

docstring_title

Parameters:
  • iddep ()

searchSets(self, keyword)

source code 

docstring_title

Parameters:
  • keyword ()

searchSimilarPackages(self, mystring, atom=False)

source code 

docstring_title

Parameters:
  • mystring ()
  • atom ()

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

source code 

docstring_title

Parameters:
  • keyword ()
  • sensitive ()
  • slot ()
  • tag ()
  • branch ()
  • order_by ()
  • just_id ()

searchProvide(self, keyword, slot=None, tag=None, branch=None, justid=False)

source code 

docstring_title

Parameters:
  • keyword ()
  • slot ()
  • tag ()
  • branch ()
  • justid ()

searchPackagesByName(self, keyword, sensitive=False, branch=None, justid=False)

source code 

docstring_title

Parameters:
  • keyword ()
  • sensitive ()
  • branch ()
  • justid ()

searchPackagesByCategory(self, keyword, like=False, branch=None)

source code 

docstring_title

Parameters:
  • keyword ()
  • like ()
  • branch ()

searchPackagesByNameAndCategory(self, name, category, sensitive=False, branch=None, justid=False)

source code 

docstring_title

Parameters:
  • name ()
  • category ()
  • sensitive ()
  • branch ()
  • justid ()

isPackageScopeAvailable(self, atom, slot, revision)

source code 

docstring_title

Parameters:
  • atom ()
  • slot ()
  • revision ()

isBranchMigrationAvailable(self, repository, from_branch, to_branch)

source code 

Returns whether branch migration metadata given by the provided key (repository, from_branch, to_branch,) is available.

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

listAllPackages(self, get_scope=False, order_by=None, branch=None, branch_operator='=')

source code 

docstring_title

Parameters:
  • get_scope ()
  • order_by ()
  • branch ()
  • branch_operator ()

listAllInjectedPackages(self, justFiles=False)

source code 

docstring_title

Parameters:
  • justFiles ()

listAllCounters(self, onlycounters=False, branch=None, branch_operator='=')

source code 

docstring_title

Parameters:
  • onlycounters ()
  • branch ()
  • branch_operator ()

listAllIdpackages(self, branch=None, branch_operator='=', order_by=None)

source code 

docstring_title

Parameters:
  • branch ()
  • branch_operator ()
  • order_by ()

listAllDependencies(self, only_deps=False)

source code 

docstring_title

Parameters:
  • only_deps ()

listAllBranches(self)

source code 

docstring_title

listIdPackagesInIdcategory(self, idcategory, order_by='atom')

source code 

docstring_title

Parameters:
  • idcategory ()
  • order_by ()

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

source code 

docstring_title

Parameters:
  • do_sort ()
  • full_path ()

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

source code 

docstring_title

Parameters:
  • clean ()
  • count ()

listAllCategories(self, order_by='')

source code 

docstring_title

Parameters:
  • order_by ()

listConfigProtectDirectories(self, mask=False)

source code 

docstring_title

Parameters:
  • mask ()

databaseStructureUpdates(self)

source code 

docstring_title

validateDatabase(self)

source code 

docstring_title

getIdpackagesDifferences(self, foreign_idpackages)

source code 

docstring_title

Parameters:
  • foreign_idpackages ()

uniformBranch(self, branch)

source code 

docstring_title

Parameters:
  • branch ()

alignDatabases(self, dbconn, force=False, output_header=' ', align_limit=300)

source code 

docstring_title

Parameters:
  • dbconn ()
  • force ()
  • output_header ()
  • align_limit ()

checkDatabaseApi(self)

source code 

docstring_title

doDatabaseImport(self, dumpfile, dbfile)

source code 

docstring_title

Parameters:
  • dumpfile ()
  • dbfile ()

doesTableExist(self, table)

source code 

docstring_title

Parameters:
  • table ()

doesColumnInTableExist(self, table, column)

source code 

docstring_title

Parameters:
  • table ()
  • column ()

database_checksum(self, do_order=False, strict=True, strings=False)

source code 

docstring_title

Parameters:
  • do_order ()
  • strict ()
  • strings ()

updateInstalledTableSource(self, idpackage, source)

source code 

docstring_title

Parameters:
  • idpackage ()
  • source ()

addPackageToInstalledTable(self, idpackage, repoid, source=0)

source code 

docstring_title

Parameters:
  • idpackage ()
  • repoid ()
  • source ()

retrievePackageFromInstalledTable(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage ()

removePackageFromInstalledTable(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage ()

removePackageFromDependsTable(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage ()

createDependsTable(self)

source code 

docstring_title

sanitizeDependsTable(self)

source code 

docstring_title

isDependsTableSane(self)

source code 

docstring_title

createXpakTable(self)

source code 

docstring_title

storeXpakMetadata(self, idpackage, blob)

source code 

docstring_title

Parameters:
  • idpackage ()
  • blob ()

retrieveXpakMetadata(self, idpackage)

source code 

docstring_title

Parameters:
  • idpackage ()

retrieveBranchMigration(self, to_branch)

source code 

This method returns branch migration metadata stored in Entropy Client database (installed packages database). It is used to determine whether to run per-repository branch migration scripts.

Parameters:
  • to_branch (string) - usually the current branch string
Returns: dict
branch migration metadata contained in database

dropContent(self)

source code 

docstring_title

dropAllIndexes(self)

source code 

docstring_title

listAllIndexes(self, only_entropy=True)

source code 

docstring_title

Parameters:
  • only_entropy ()

createAllIndexes(self)

source code 

docstring_title

createPackagesetsIndex(self)

source code 

docstring_title

createNeededlibraryidpackagesIndex(self)

source code 

docstring_title

createNeededlibrarypathsIndex(self)

source code 

docstring_title

createAutomergefilesIndex(self)

source code 

docstring_title

createNeededIndex(self)

source code 

docstring_title

createMessagesIndex(self)

source code 

docstring_title

createCompileFlagsIndex(self)

source code 

docstring_title

createUseflagsIndex(self)

source code 

docstring_title

dropContentIndex(self, only_file=False)

source code 

docstring_title

Parameters:
  • only_file ()

createContentIndex(self)

source code 

docstring_title

createConfigProtectReferenceIndex(self)

source code 

docstring_title

createBaseinfoIndex(self)

source code 

docstring_title

createLicensedataIndex(self)

source code 

docstring_title

createLicensesIndex(self)

source code 

docstring_title

createCategoriesIndex(self)

source code 

docstring_title

createKeywordsIndex(self)

source code 

docstring_title

createDependenciesIndex(self)

source code 

docstring_title

createCountersIndex(self)

source code 

docstring_title

createSourcesIndex(self)

source code 

docstring_title

createProvideIndex(self)

source code 

docstring_title

createConflictsIndex(self)

source code 

docstring_title

createExtrainfoIndex(self)

source code 

docstring_title

createEclassesIndex(self)

source code 

docstring_title

regenerateCountersTable(self, vdb_path, output=False)

source code 

docstring_title

Parameters:
  • vdb_path ()
  • output ()

clearTreeupdatesEntries(self, repository)

source code 

docstring_title

Parameters:
  • repository ()

resetTreeupdatesDigests(self)

source code 

docstring_title

migrateCountersTable(self)

source code 

docstring_title

createNeededlibrarypathsTable(self)

source code 

docstring_title

createNeededlibraryidpackagesTable(self)

source code 

docstring_title

createInstalledTableSource(self)

source code 

docstring_title

createPackagechangelogsTable(self)

source code 

docstring_title

createAutomergefilesTable(self)

source code 

docstring_title

createPackagesignaturesTable(self)

source code 

docstring_title

createPackagespmphases(self)

source code 

docstring_title

createEntropyBranchMigrationTable(self)

source code 

docstring_title

createPackagesetsTable(self)

source code 

docstring_title

createCategoriesdescriptionTable(self)

source code 

docstring_title

createTreeupdatesTable(self)

source code 

docstring_title

createLicensedataTable(self)

source code 

docstring_title

createLicensesAcceptedTable(self)

source code 

docstring_title

createInstalledTable(self)

source code 

docstring_title

addDependsRelationToDependsTable(self, iterable)

source code 

docstring_title

Parameters:
  • iterable ()

clearDependsTable(self)

source code 

docstring_title

regenerateDependsTable(self, output=True)

source code 

docstring_title

Parameters:
  • output ()

regenerateLibrarypathsidpackageTable(self, output=True)

source code 

docstring_title

Parameters:
  • output ()

moveCountersToBranch(self, to_branch, from_branch=None)

source code 

docstring_title

Parameters:
  • to_branch ()
  • from_branch ()

atomMatchFetchCache(self, *args)

source code 

docstring_title

Parameters:
  • *args ()

atomMatchStoreCache(self, *args, **kwargs)

source code 

docstring_title

Parameters:
  • *args ()
  • **kwargs ()

atomMatchValidateCache(self, cached_obj, multiMatch, extendedResults)

source code 

docstring_title

Parameters:
  • cached_obj ()
  • multiMatch ()
  • extendedResults ()

idpackageValidator(self, idpackage, live=True)

source code 

docstring_title

Parameters:
  • idpackage (int) - package indentifier
  • live ()

packagesFilter(self, results)

source code 

docstring_title

Parameters:
  • results ()