summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache
Commit message (Collapse)AuthorAgeFilesLines
* cache/flat_hash.py: unicode_literalsZac Medico2013-01-181-7/+7
|
* cache/sqlite.py: unicode_literalsZac Medico2013-01-181-3/+4
|
* ebuild_xattr.py: lowercase utf-8 commentZac Medico2013-01-181-1/+1
|
* Use 'with file' more.Zac Medico2012-12-281-6/+3
| | | | This helps to minimize ResourceWarning triggered by ^C with python3.
* flat_hash.__iter__: validate keysZac Medico2012-11-201-3/+7
|
* OrderedDict: fix setitem bug #436974Zac Medico2012-10-021-3/+3
| | | | | | This fixes some strange behavior triggered during fetch, which is only observable with Python 2.6 since it doesn't have collections.OrderedDict.
* Remove obsolete cache/flat_list.pyZac Medico2012-09-241-135/+0
| | | | | | This module has been obsolete and useless for many years, which is especially obvious since it was missing INHERITED from its auxdbkey_order and it did not write any eclass metadata.
* cache/sqlite.py: translate None to empty stringZac Medico2012-09-241-2/+7
|
* cache/metadata.py: add HDEPENDZac Medico2012-09-242-2/+4
|
* cache/sqlite.py: fix getitem order assumptionZac Medico2012-09-181-11/+5
| | | | | The order assumption was incorrect when new columns were added, since they could be added in any order.
* egencache: prune empty cache directoriesv2.2.0_alpha114Zac Medico2012-06-271-8/+14
|
* cache/sqlite.py: dynamically add columns to tableZac Medico2012-06-101-2/+40
|
* reconstruct_eclasses: unicode hashes for python2v2.2.0_alpha108Zac Medico2012-05-241-2/+5
|
* validate_entry: handle KeyError for bug #417253Zac Medico2012-05-231-1/+6
| | | | This error is triggered by corrupt cache entries.
* Replace @returns with @return.Zac Medico2012-03-271-1/+1
|
* cache/template.__getitem__: filter INHERITEDZac Medico2011-10-292-1/+5
| | | | | | | Never return INHERITED, since portdbapi.aux_get() will generate it automatically from _eclasses_, and we want to omit it in comparisons between cache entries like those that egencache uses to avoid redundant writes (see commit 0e120da008c9d0d41c9372c81145c6e153028a6d).
* Fix serialize_eclasses = False in cache template.Zac Medico2011-10-172-7/+29
| | | | | | | This fixes volatile cache validation that did not get fixed in commit a63c163a50bf8a4e5ca8673cd8bebae29c36643a. Now all volatile cache problems that have been introduced since commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212 should be fixed.
* portdbapi: fix volatile cache handlingZac Medico2011-10-172-107/+3
| | | | | | | | | 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.
* layout.conf: add git friendly pregenerated cache formatBrian Harring2011-10-141-2/+7
| | | | | | | | | | | | | | | | | Enabled via cache-format = md5-dict This format is essentially just flat_hash, using md5 rather than mtime, and dropping the path component from _eclasses_ entries. From a speed standpoint, the md5 overhead is ~16% in comparison to mtime, timed on a modern sandybridge; specifically, validating 29k nodes takes ~8.8s for flat_md5, while the pms norm is ~7.7s. That said, the cache is /usable/ in places PMS is not; in those cases, it can definitely be a win since even if the cache is partially old, it's better than regenerating everything from scratch. (cherry picked from commit 95ddf97e2f7e7d3f6a072604b2df5f77e9298558) Change-Id: Ic3561369b7a8be7f86480f339ab1686fddea6dff
* cache: rewrite to support arbitrary validation methodBrian Harring2011-10-142-17/+53
| | | | | | | | | | 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
* cache.util: drop completely dead module/codeBrian Harring2011-10-141-170/+0
| | | | | | | Looks of it, this code was copied/mangled into action_metadata; the noise/callbacks in use don't do anything, so drop them, the dead code, and clean up the exception handling to reflect the new reality (cherry picked from commit 320890fadbedf678119ac06d458ed6086075431e)
* Revert "Use plain ascii encoding for this file"Zac Medico2011-10-141-1/+2
| | | | | | | | This reverts commit 2a4b07c8d0105ea7418ea3afc9e777a7a396fc46. Current python ebuilds no longer remove the encodings directory when USE=ebuild is enabled, so now it's possible to use UTF8 encoding in python source files without triggering unsightly SyntaxError messages when python_mod_optimize is compiling byte-code files.
* layout.conf: revert authoritative-cache supportZac Medico2011-10-131-1/+0
| | | | Those who wanted it have decided to use a different approach.
* Fix 'authoritative' spelling.Zac Medico2011-09-301-1/+1
|
* layout.conf: allow a repository to state the cache is authorativeBrian Harring2011-09-301-0/+1
| | | | | | | | | | | | | | | | 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
* cache/volatile: fix __iter__ and __contains__Zac Medico2011-09-071-2/+6
| | | | Special methods can't be assigned in the constructor.
* Migrate from codecs.open() to io.open().Zac Medico2011-07-102-12/+25
| | | | | | | | | | | | | | | | | The io.open() function is the same as the built-in open() function in python3, and its implementation is optimized in python-2.7 and later. In addition to the possible performance improvement, this also allows us to avoid any future compatibility issues with codecs.open() that may arise if it is delegated to the built-in open() function as discussed in PEP 400. The main caveat involved with io.open() is that TextIOWrapper.write() raises TypeError if given raw bytes, unlike the streams returned from codecs.open(). This is mainly an issue for python2 since literal strings are raw bytes. We handle this by wrapping TextIOWrapper.write() arguments with our _unicode_decode() function. Also, the atomic_ofstream class overrides the write() method in python2 so that it performs automatic coercion to unicode when necessary.
* cache.sqlite: handle readonly morev2.2.0_alpha33Zac Medico2011-05-121-1/+1
|
* cache.volatile: discard "perms" paramZac Medico2011-05-121-1/+2
|
* cache.sqlite: handle readonlyZac Medico2011-05-121-2/+3
|
* cache.ebuild_xattr: don't import ENODATA globallyZac Medico2011-02-071-6/+7
| | | | ENODATA is undefined on FreeBSD. This will fix bug #354057.
* cache.sqlite: handle sqlite ImportErrorv2.2.0_alpha21Zac Medico2011-02-061-8/+15
| | | | This will fix bug #353836.
* ebuild_xattr: lazily import xattrZac Medico2011-01-301-2/+4
|
* anydbm: use gdbm "u" flag for concurrent writersZac Medico2010-12-261-4/+30
| | | | This will fix bug #53607.
* Make portage.cache.anydbm use absolute_import instead of the thev2.2_rc77Zac Medico2010-09-061-3/+5
| | | | __import__() approach it currently uses.
* Remove unused imports found by pylint.Arfrever Frehtes Taifersar Arahesis2010-08-292-4/+2
|
* Fix import.Arfrever Frehtes Taifersar Arahesis2010-08-291-2/+2
|
* Ensure SystemExit is never caught.Zac Medico2010-08-261-0/+4
|
* portage/cache/mappings.py: Remove deprecated functionsSebastian Luther2010-08-111-25/+0
|
* Add REQUIRED_USE to metadata keys, caches, etc.Sebastian Luther2010-08-102-2/+2
|
* Implement SlotDict.__repr__() to behave like dict.Zac Medico2010-06-041-0/+3
|
* Remove all svn $Id keywords.Zac Medico2010-03-2414-14/+0
|
* Handle CacheCorruption from self.db_ro in _setitem, triggered by INHERITEDZac Medico2010-02-201-1/+4
| | | | | | | containing non-existent eclass inside metadata.database._parse_data. Thanks to Vlastimil Babka <caster@g.o> for reporting. svn path=/main/trunk/; revision=15412
* Reverting r15293, it was actually not needed.Mounir Lamouri2010-01-311-1/+1
| | | | svn path=/main/trunk/; revision=15298
* In __iter__, handle OSError from lstat in case a cache entry disappears.Zac Medico2010-01-311-1/+5
| | | | svn path=/main/trunk/; revision=15297
* Make __iter__ use list.pop() instead of pop(0), for greater efficiency.Zac Medico2010-01-311-6/+4
| | | | svn path=/main/trunk/; revision=15296
* Bug #302764 - Inside __iter__, only recurse 1 deep, in order to avoidZac Medico2010-01-311-4/+10
| | | | | | | | iteration over entries from another nested cache instance. This can happen if the user nests an overlay inside /usr/portage/local. Thanks to Vlastimil Babka <caster@g.o> for this patch. svn path=/main/trunk/; revision=15295
* Fix: change os.mkdir to os.makedirs in case of there are more than one ↵Mounir Lamouri2010-01-301-1/+1
| | | | | | | | directory depth missing. According to docs.python.org, permissions may be not respected with os.makedirs... with some systems. svn path=/main/trunk/; revision=15293
* fix flat_list cache backendMounir Lamouri2010-01-301-11/+11
| | | | | | looks like it was outdated wrt. template cache backend svn path=/main/trunk/; revision=15291
* Define __slots__ in all classes.Zac Medico2010-01-301-0/+8
| | | | svn path=/main/trunk/; revision=15287