summaryrefslogtreecommitdiffstats
path: root/bin/egencache
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in comments.Arfrever Frehtes Taifersar Arahesis2011-10-301-3/+3
|
* egencache: tweak redundant write check conditionZac Medico2011-10-291-17/+16
| | | | | We can use the raise_stat_collision attribute to determine when it is necessary to check for redundant writes.
* Use dbapi._known_keys more.Zac Medico2011-10-291-1/+1
|
* egencache: avoid redundant md5-dict writesZac Medico2011-10-291-13/+45
| | | | | The pms cache already does this automatically, since __setitem__ calls are used to detect stat collisions in order to solve bug #139134.
* egencache: ensure correct porttreesZac Medico2011-10-291-0/+2
| | | | | | | The GenCache class assumes that portdb.porttrees[0] is the desired tree, so assert that it is true. The behavior should have already been correct, since PORTDIR_OVERLAY was already set to an empty string when necessary.
* egencache: fix StatCollision handling breakageZac Medico2011-10-291-3/+3
| | | | | This has been broken since the _eclasses_ structure changed in commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212.
* egencache: update ebuild_hash.mtime after utimeZac Medico2011-10-291-0/+1
|
* egencache: multiple cache-formats supportZac Medico2011-10-291-14/+26
| | | | | If layout.conf contains "cache-formats = md5-dict pms", egencache will now write both formats.
* layout.conf: rename cache_format to cache_formatsZac Medico2011-10-251-1/+2
| | | | | | We read layout.conf cache-formats from left to right and use the first supported type that's found. This will allow support for multiple formats in parallel, providing for smooth transitions between formats.
* egencache: remove unused importZac Medico2011-10-151-1/+0
|
* egencache: add _mtime_ to metadataZac Medico2011-10-151-2/+1
| | | | | | | This fixes a regression in FEATURES=parse-eapi-ebuild-head support for egencache since commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212. If the metadata does not contain _mtime_ here, then _setitem from cache.metadata.database will raise KeyError.
* cache: rewrite to support arbitrary validation methodBrian Harring2011-10-141-4/+10
| | | | | | | | | | 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
* layout.conf: make the pregenerated cache format controllableBrian Harring2011-10-131-2/+2
| | | | | | | | | | | 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).
* egencache: tweak cache dir write access checkZac Medico2011-09-071-5/+9
|
* egencache: remove metadata-transfer warningZac Medico2011-09-071-3/+0
| | | | | | It should be enough that the automatic use of metadata-transfer is documented in the man page, and allows us to avoid showing a useless warning in common usage scenarios.
* egencache: validate cache dir moreZac Medico2011-09-071-3/+19
|
* tests/emerge: test egencacheZac Medico2011-09-051-7/+4
| | | | | This tests --update in any case, and --update-use-local-desc only if python xml support is detected.
* egencache: don't require xml in global scopeZac Medico2011-08-271-8/+8
|
* egencache: implement XMLParser.doctype()Zac Medico2011-08-271-1/+11
| | | | | | | This is prevents "DeprecationWarning: This method of XMLParser is deprecated. Define doctype() method on the TreeBuilder target." warnings. The code is copied from repoman, commit 5a5e51a2737a0855bb562683f50c57cc31587460.
* egencache: add --portdir-overlay optionZac Medico2011-08-131-0/+9
| | | | This will fix bug #353648.
* Migrate from codecs.open() to io.open().Zac Medico2011-07-101-18/+23
| | | | | | | | | | | | | | | | | 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.
* egencache: fix cmp_func for python3Zac Medico2011-02-181-0/+8
|
* egencache: --preserve-comments allow missing fileZac Medico2011-02-131-4/+26
| | | | This will fix bug #354687.
* egencache: don't ignore as much with --tolerantZac Medico2011-02-131-3/+4
| | | | | | Errors returned from --update-use-local-desc and --update-changelogs are no longer ignored with --tolerant. This will fix part of bug #354687.
* Tweak PollScheduler signal handling.Zac Medico2011-01-151-3/+7
|
* Add PollScheduler.terminate() for interruption.Zac Medico2011-01-151-1/+24
| | | | | This allows PollScheduler instances to do basic cleanup and terminate gracefully when SIGINT or SIGTERM signals are received.
* When killed by signal, return 128 + signum.Zac Medico2011-01-151-4/+4
| | | | | This is the same convention that bash uses for returncodes of processes that are killed by signals.
* egencache: handle ImportError for ExpatErrorZac Medico2010-12-311-5/+10
|
* egencache --update-changelogs: reverse the sort order for headers.Michał Górny2010-10-241-2/+3
|
* Fix undefined name 'output_mode'.Zac Medico2010-10-041-1/+1
|
* egencache: Sort file names for ChangeLogSebastian Luther2010-10-041-6/+76
|
* egencache --update-changelogs: write if neededMichał Górny2010-10-031-9/+18
| | | | | Compare the last commit timestamp with the ChangeLog file timestamp to guess whether a particular ChangeLog needs updating.
* egencache --update-changelogs: Filter messagesMichał Górny2010-10-031-4/+15
| | | | | Drop common commit message suffixes like 'git-svn-id' and repoman version note.
* egencache --update-changelogs: escape CP regexpMichał Górny2010-10-031-1/+1
|
* egencache --update-changelogs: don't break change list on hyphens.Michał Górny2010-10-031-2/+6
|
* egencache --update-changelogs: strip leading CP from the log messages.Michał Górny2010-10-031-1/+4
|
* Add support for 'egencache --update-changelogs'.Michał Górny2010-10-021-4/+141
|
* Make egencache --update-use-local-desc use codecs.open() to write toZac Medico2010-08-281-14/+21
| | | | use.local.desc (fixes possible unicode issues with python3).
* For egencache --preserve-comments, probe comments in binary mode inZac Medico2010-08-281-9/+11
| | | | | | order to avoid potential character encoding issues (both in terms of decoding and in calculating file position given variable-width character encodings like UTF-8.
* egencache: Add comment preserving to --update-use-local-desc.Michał Górny2010-08-281-5/+32
|
* Support specifying an alternate output file for --update-use-local-desc.Michał Górny2010-08-281-16/+31
|
* Define a cmp work-alike function for use in the egencacheZac Medico2010-08-271-5/+11
| | | | | --update-use-local-desc code, since it's ugly to have so many repetitions of this construct.
* Fix breakage in egencache --update-use-local-desc code.Zac Medico2010-08-271-8/+21
|
* Use cmp_sort_key() for python3 compatibility.Zac Medico2010-08-271-5/+4
|
* Support returning multiple flag descriptions when restrict is used.Michał Górny2010-08-271-1/+28
| | | | | | | Return a dict of dicts in parse_metadata_use(), with second-level keys being the restrict strings (or None when no restrict). When generating use.local.desc, use the description from the possibly-highest-matching atom.
* Make egencache only show a warning about FEATURES=metata-transfer if theZac Medico2010-08-261-1/+1
| | | | --update option is given.
* Fix up error handling for egencache --update-use-local-desc.Zac Medico2010-08-261-3/+10
|
* egencache: Introduce the --update-use-local-desc action.Michał Górny2010-08-261-2/+72
|
* egencache: introduce the preliminary support for multiple actions.Michał Górny2010-08-261-30/+45
| | | | | | Regroup the options, splitting them into 'Actions', 'Common' and action-specific options. Always check whether the 'update' action was chosen. Support catching multiple return codes.
* Add a wrapper around config.features that provides the followingZac Medico2010-08-211-2/+0
| | | | | | | | | | | | | | | | enhancements: * The FEATURES variable is automatically synchronized upon modification. * Modifications result in a permanent override that will cause the change to propagate to the incremental stacking mechanism in config.regenerate(). This eliminates the need to call config.backup_changes() when FEATURES is modified, since any overrides are guaranteed to persist despite calls to config.reset(). This allows cleanup of all code that overrides FEATURES, and also allows config.regenerate() to stack FEATURES such that special cases are not needed for package.env handling inside config.setcpv().