summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/porttree.py
Commit message (Collapse)AuthorAgeFilesLines
* Add workaround for Python 2.6.4 issue 4978Zac Medico2013-01-181-2/+2
| | | | | Avoid "TypeError: keywords must be strings" issue triggered by unicode_literals: http://bugs.python.org/issue4978
* Use unicode_literals more.Zac Medico2013-01-181-0/+2
| | | | | This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.
* portdbapi.cp_all(): add reverse sort parameterZac Medico2013-01-061-2/+3
|
* Add portage._internal_caller var, and use it.Zac Medico2013-01-031-2/+2
|
* portdbapi: use global_event_loop when safeZac Medico2013-01-031-1/+12
|
* porttree.py: tweak deprecated constructor paramsZac Medico2012-12-241-4/+5
| | | | | | Trigger a DeprecationWarning even when None is passed in for one of the deprecated parameters, ensuring that any potentially unsafe usage triggers the warning.
* portdbapi: DeprecationWarning for 'pms' cacheZac Medico2012-11-271-0/+7
|
* bintree/portree: fix getslot for EAPI 5 sub-slotZac Medico2012-10-171-4/+2
|
* _parse_uri_map: preserve order of URIsZac Medico2012-10-081-3/+8
| | | | Returns a dict of tuples instead of a dict of sets.
* Substitute EventLoop for PollScheduler.Zac Medico2012-10-051-3/+3
| | | | | EventLoop suffices for all of these cases. EventLoop(main=False) is used for thread safety where API consumers may be using threads.
* Add experimental EAPI 5-hdepend support.Ambroz Bizjak2012-09-241-1/+2
|
* _pkg_str: pass in config + metadata with KEYWORDSZac Medico2012-08-241-2/+2
| | | | | This will be needed in order to support stable use.mask/force for bug #431078.
* Add experimental EAPI 4-slot-abi support.Zac Medico2012-06-221-2/+2
| | | | Refer to 4-slot-abi.docbook for a full description.
* dbapi: construct _pkg_str during match on-demandZac Medico2012-06-111-5/+12
|
* portdbapi: don't convert _pkg_str to strZac Medico2012-05-131-1/+2
|
* Add a _pkg_str class to cache catpkgsplit resultsZac Medico2012-05-121-2/+2
| | | | | This will compensate for the removal of the catpkgsplit cache in commit 68888b0450b1967cb70673a5f06b04c167ef879c.
* Don't write or trust cache for unsupported EAPIs.Zac Medico2012-05-101-51/+9
| | | | | | Since we're supposed to be able to efficiently obtain the EAPI from _parse_eapi_ebuild_head, we don't need to write or trust cache entries for unsupported EAPIs.
* porttree.py: remove unused importsv2.2.0_alpha103Zac Medico2012-05-091-2/+0
|
* Parse EAPI with pattern from PMS section 7.3.1.Zac Medico2012-05-091-29/+13
| | | | | | | | This implements the specification that was approved in Gentoo's council meeting on May 8, 2012 (see bug #402167). The parse-eapi-ebuild-head FEATURES setting is now enabled by default, and causes non-conformant ebuilds to be treated as invalid. This behavior will soon become enabled unconditionally.
* portdbapi: update comment about repoman cachesZac Medico2012-04-221-1/+1
|
* dbapi.cp_list: remove special case for virtualsZac Medico2012-04-221-9/+5
| | | | | | | Since commit d603f1440c814377fbc1965729fd9b6b008cf76d, the match caches use the result from dep_expand for the cache_key, so the caches are free of old-style virtual mappings. This allows the match caches to be safely shared with cp_list.
* dbapi: account for unevaluated_atom in cachesZac Medico2012-04-201-13/+13
| | | | | This will fix bug 412391. This is analogous to the bug fixed in commit 5438bb29c996d777b6343515995176912a7c137f.
* Replace @returns with @return.Zac Medico2012-03-271-3/+3
|
* Make portdbapi.eclassdb a property.Zac Medico2011-12-091-1/+7
|
* Delete portage.dbapi.porttree._repo_info class and _repo_info attribute ofArfrever Frehtes Taifersar Arahesis2011-12-091-21/+3
| | | | | portage.dbapi.porttree.portdbapi objects. Migrate consumers to repositories attribute of portage.dbapi.porttree.portdbapi objects.
* Add eclass_db attribute in portage.repository.config.RepoConfig objects.Arfrever Frehtes Taifersar Arahesis2011-12-091-14/+2
|
* portagetree: remove broken depcheck methodZac Medico2011-10-291-4/+1
| | | | It called dep_check without the required third argument.
* Use dbapi._known_keys more.Zac Medico2011-10-291-12/+6
|
* Deprecate unused 'virtual' constructor parametersZac Medico2011-10-281-2/+16
|
* stacklevel=3 for properties warningsZac Medico2011-10-271-1/+1
| | | | There's an extra level for the @property wrapper.
* python3.2 fixes: "ResourceWarning: unclosed file"Zac Medico2011-10-171-3/+3
|
* portdbapi: fix volatile cache handlingZac Medico2011-10-171-12/+12
| | | | | | | | | The metadata_overlay usage, that was triggered automatically for users without depcachedir write access, has been broken since commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212. The metadata_overlay class is not compatible with the new validation code, so remove it. If users have metadata_overlay configured as their cache module, fall back to flat_hash.
* portdbapi.aux_get: remove redunant EAPI codeZac Medico2011-10-161-11/+8
| | | | This code only needs to exist in _metadata_callback.
* hashed_path: convert stat OSError to FileNotFoundZac Medico2011-10-161-1/+1
| | | | | This makes it consistent with perform_checksum call which also raises FileNotFound instead of OSError.
* EbuildMetadataPhase: avoid redundant EAPI parsingZac Medico2011-10-161-1/+1
|
* _pull_valid_cache: pass unicode to hashed_pathZac Medico2011-10-151-4/+1
| | | | | | | | | This removes a conversion to bytes that should have been removed in commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212. The hashed_path location attribute should always be unicode, for consistency will path handling throughout portage. The hashed_path class internally uses the portage portage.os wrapper to ensure that paths are encoded as utf_8 bytes when they are passed to the real os module for stat calls.
* portdbapi.aux_get: fix broken _metadata_callbackZac Medico2011-10-151-1/+1
| | | | | This fixes a regression in FEATURES=parse-eapi-ebuild-head support since commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212.
* emerge --metadata: fix breakageZac Medico2011-10-141-6/+14
| | | | | | The hunk that got removed from action_metadata in commit d4ea29bf6a3ce35d49e0f54f9173e3a6e42da2d6 is actually needed when FEATURES=metadata-transfer is enabled.
* cache: rewrite to support arbitrary validation methodBrian Harring2011-10-141-39/+47
| | | | | | | | | | Specifically, the cache can use any portage supported checksum method, or use the standard mtime approach. In addition, support controlling whether or not paths are stored, and generally try to restore some of the centralization/encapsulation that was in place originally. (cherry picked from commit bc1aed614fb588f0ade5bcb5d1265a8db0f8d247) Change-Id: Ic38057e7dbb15063c64a93c99e66e113a7d4c70e
* _pull_valid_cache: fix readonly delete logicZac Medico2011-10-131-1/+1
|
* layout.conf: make the pregenerated cache format controllableBrian Harring2011-10-131-6/+4
| | | | | | | | | | | Controllable via 'cache-format', currently it supports only one cache; 'pms', and defaults to it. If an unsupported cache-format is specified, the cache is disabled. If pms is specified and metadata/cache directory doesn't exist, the cache is disabled. Finally, this rips out the best module support for locally overriding the cache format used for pregenerated caches; this functionality made zero sense (upstream determines the format, we use what is available).
* layout.conf: revert authoritative-cache supportZac Medico2011-10-131-6/+4
| | | | Those who wanted it have decided to use a different approach.
* Fix 'authoritative' spelling.Zac Medico2011-09-301-2/+2
|
* layout.conf: allow a repository to state the cache is authorativeBrian Harring2011-09-301-6/+9
| | | | | | | | | | | | | | | | By authorative, this means "the cache is accurate; skip validation". While a useful hint for a slight speedup in validation, the true gain is for repositories that are distributed in a fashion that doesn't preserve mtime; git primarily. Setting authorative-cache = true results in portage skipping mtime validation checks for the bundled cache, allowing for git vcs based repos to distribute a cache. BUG=chromium-os:21049 TEST=dump a cache into metadata/cache, touch it to now, set layout.conf to authorative-cache=true, verify it doesn't generate cache entries for that repo. Change-Id: I92423e679bc171d2411a18d6d3ac22e8ef457753
* porttree.py: remove unused variablesZac Medico2011-09-271-7/+5
|
* portdbapi.xmatch: fix unknown repo / return emptyZac Medico2011-09-241-1/+4
| | | | | We want to return an empty list for the match-* methods, otherwise an empty string.
* portdbapi: deprecate unused 'visible' methodZac Medico2011-09-241-7/+6
|
* portdbapi.xmatch: combine match-all with othersZac Medico2011-09-241-22/+3
| | | | This eliminates redundant code.
* portdbapi.xmatch: combine minimum-all/*-visibleZac Medico2011-09-241-25/+4
| | | | This eliminates redundant code.
* portdbapi.xmatch: combine *-visible codeZac Medico2011-09-241-13/+17
| | | | | This allows match-visible to avoid calling match-all, which allows it to avoid an extra loop over all repos.