summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildFetcher.py
Commit message (Collapse)AuthorAgeFilesLines
* AsynchronousTask: add _async_wait methodZac Medico2012-12-301-3/+3
| | | | | | | | For cases where _start returns synchronously, this method is a convenient way to trigger an asynchronous call to self.wait() (in order to notify exit listeners), avoiding excessive event loop recursion (or stack overflow) that synchronous calling of exit listeners can cause.
* EbuildFetcher/MergeProcess: inherit ForkProcessZac Medico2012-10-031-42/+11
| | | | | Also add missing __slots__ to ForkProcess. TODO: Share code between ForkProcess and MergeProcess.
* _apply_hash_filter: make hash_filter simplerZac Medico2012-08-211-0/+2
| | | | | Now any callable object will work, which might be helpful for consumers of the Manifest.checkFileHashes() method.
* Implement PORTAGE_CHECKSUM_FILTER for bug #432170Zac Medico2012-08-211-1/+3
|
* Close fewer file descriptors for fork / no exec.Zac Medico2012-03-271-10/+4
| | | | This will fix bug #374335.
* Comment about _setup_pipes / PyPy GC interaction.Zac Medico2012-02-151-1/+5
|
* Assert that fork returns int for bug 403697.Zac Medico2012-02-141-0/+3
| | | | | These cases should have been included with commit 6a94a074aa0475173a51f3f726377d4c407e986b.
* After python fork, don't close fds for PyPy 1.8.Zac Medico2012-02-141-1/+5
| | | | | | | | | | | | | | | | If we close all open file descriptors after a fork, with PyPy 1.8 it triggers "[Errno 9] Bad file descriptor" later in the subprocess. Apparently it is holding references to file descriptors and closing them after they've already been closed and re-opened for other purposes. As a workaround, we don't close the file descriptors, so that they won't be re-used and therefore we won't be vulnerable to this kind of interference. The obvious caveat of not closing the fds is that the subprocess can hold locks that belonged to the parent process, even after the parent process has released the locks. Hopefully this won't be a major problem though, since the subprocess has to exit at release the lock eventually, when the EbuildFetcher or _MergeProcess task is complete.
* manifest: controllable per repoBrian Harring2011-09-271-9/+12
| | | | | | | | | | | This adds three states to layout.conf key use-manifest; false, true, and strict. false means "don't use manifests at all" true means "use and generate manifests, but allow them to be missing" strict means "manifests must be used everywhere in this repo" BUG=chromium-os:11308 TEST=repoman manifest usage.
* Bind all manifest access through repoconfigsBrian Harring2011-09-121-2/+4
| | | | | This enables controling the behaviour (creation and validation) per repo, and while mildly ugly, refactors in the right direction.
* Fix a typo in a doc string.Arfrever Frehtes Taifersar Arahesis2011-07-171-1/+1
|
* EbuildFetcher: handle FileNotFoundZac Medico2011-07-161-0/+3
|
* Fix a typo in a comment.Zac Medico2011-07-161-1/+1
|
* EbuildBuild: skip the fetch queue when possibleZac Medico2011-07-161-15/+105
| | | | | | | Since commit f07f8386e945b48358c11c121960e4833c539752, it was possible for EbuildBuild to wait on the fetch queue even in cases in which all required files had been previously fetched. Now this case is optimized to skip the fetch queue, as discribed in bug #375331, comment #2.
* Remove unneeded _unicode_decode for io.StringIO.Zac Medico2011-07-121-2/+1
| | | | | | | Since StringIO.StringIO fallback was removed in commit 5df96179611ce0e98727945b1800b43daccedfc2, we can rely on io.StringIO.getoutput() to return unicode, so there's no need to call _unicode_decode on the result.
* Remove python-2.6 StringIO.StringIO fallback.Zac Medico2011-07-121-1/+1
| | | | | | | | Since the io module in python-2.6 was broken when threading was disabled, we needed to fall back from io.StringIO to StringIO.StringIO in this case (typically just for Gentoo's stage1 and stage2 tarballs). Now that python-2.7 is stable in stages and we rely on io.open() being available, we can also rely on io.StringIO being available.
* Migrate from codecs.open() to io.open().Zac Medico2011-07-101-6/+7
| | | | | | | | | | | | | | | | | 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.
* add FEATURES=allow-missing-manifestsBrian Harring2011-07-061-1/+2
| | | | | | | The feature is as it sounds- primarily useful for temporary trees or instances where manifests aren't used. Signed-off-by: Brian Harring <ferringb@gmail.com>
* SubProcess: fix status for _set_returncode callerZac Medico2011-06-091-3/+3
| | | | | | These callers don't intend to make WIFSIGNALED return True, so they need to shift their codes 8 bits to the left. This ensures that commit 88f5bf84e2fd23125910b2ecaffc035971445696 behaves as intended.
* EbuildFetcher: use default SIGINT/TERM handlersZac Medico2011-01-311-0/+6
| | | | This seems to fix bug #353239.
* EbuildFetcher: bail out if missing digestZac Medico2010-12-281-1/+2
| | | | This will fix bug #348864.
* EbuildFetcher: pass digests to fetch()Zac Medico2010-12-281-4/+8
|
* EbuildFetcher: suppress finally blocks after forkZac Medico2010-11-131-4/+13
| | | | This should fix bug #345289.
* Copy term size to pty only if foreground.Zac Medico2010-10-231-1/+3
|
* EbuildFetcher: fix fetch to use manifestZac Medico2010-10-221-0/+2
| | | | | If we don't call doebuild_environment() then the 'O' variable is not set and fetch() doesn't use the manifest.
* EbuildFetcher: close uneeded fds in subprocessZac Medico2010-10-221-10/+1
|
* EbuildFetcher: Use fork for better performance.Zac Medico2010-10-211-33/+43
| | | | Instead of calling ebuild(1), simply fork and call fetch().
* reposyntax: Add support all over the placeSebastian Luther2010-09-261-1/+1
|
* Combine prefetch conditionals in EbuildFetcher.Zac Medico2010-09-091-2/+1
|
* Make EbuildFetcher always disable color in prefetch mode, sinceZac Medico2010-09-091-0/+6
| | | | prefetch output always goes to a log.
* Remove unused imports found by pylint.Arfrever Frehtes Taifersar Arahesis2010-08-291-1/+0
|
* Bug #324191 - Add support for FEATURES=compress-build-logs. The causesZac Medico2010-08-211-10/+1
| | | | | | | all build logs to be compressed while they are being written. Log file names have an extension that is appropriate for the compression type. Currently, only gzip(1) compression is supported, so build logs will have a '.gz' extension when this feature is enabled.
* Revert back to using portdbapi.getFetchMap() since the Package classZac Medico2010-08-161-5/+6
| | | | doesn't cache SRC_URI.
* Use _parse_uri_map() so that we can use cached metadata instead ofZac Medico2010-08-161-6/+5
| | | | invoking portdbapi.getFetchMap().
* Fix SubProcess instances to call _set_returncode() when appropriate,Zac Medico2010-08-151-3/+3
| | | | instead of setting self.returncode directly.
* Evaluate SRC_URI and return early if there's nothing to fetch.Zac Medico2010-08-151-26/+52
|
* Fix broken reference to self._settings (from previous commit).Zac Medico2010-07-161-1/+0
|
* Bug #327883 - Make EbuildBuild call the pre-clean phase prior toZac Medico2010-07-161-47/+30
| | | | | | | EbuildFetcher, in order to avoid re-use/removal of a build log from a previously failed build. This involves moving the pre-clean phase from EbuildExecuter to EbuildBuild, and moving build dir handling from EbuildFetcher to EbuildBuild.
* Cleanup $T earlier to prevent old messages from being displayed - bug 279041Sebastian Luther2010-04-061-1/+3
|
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Move _pty module to portage.util._pty.Zac Medico2010-03-021-1/+1
| | | | svn path=/main/trunk/; revision=15515
* Split doebuild and related code to the portage.package.ebuild module.Zac Medico2010-02-251-1/+2
| | | | svn path=/main/trunk/; revision=15448
* Use Package.use.enabled where appropriate.Zac Medico2010-02-021-1/+1
| | | | svn path=/main/trunk/; revision=15316
* Use stat rather than lstat since portage.fetch() creates symlinks whenZac Medico2010-02-021-1/+3
| | | | | | PORTAGE_RO_DISTDIRS is used. svn path=/main/trunk/; revision=15315
* Make sure the fetcher process correctly inherits PORTAGE_CONFIGROOT.Zac Medico2010-02-011-0/+1
| | | | svn path=/main/trunk/; revision=15313
* Optimize parallel-fetch for the case where all files are already fetched andZac Medico2010-02-011-0/+52
| | | | | | | have the correct size. In this case we can avoid the expense of spawning ebuild(1). svn path=/main/trunk/; revision=15312
* Deallocate config instance when necessary, to avoid memory leak when inZac Medico2010-02-011-0/+3
| | | | | | prefetch mode. svn path=/main/trunk/; revision=15311
* Force consistent color output, in case we are capturing fetchZac Medico2009-10-091-0/+5
| | | | | | | output through a normal pipe due to unavailability of ptys. Thanks to grobian for reporting. svn path=/main/trunk/; revision=14530
* Bug #286522 - Check all portdbapi.findname return values in case itZac Medico2009-09-261-0/+2
| | | | | | returns None, and raise 'ebuild not found' exceptions when necessary. svn path=/main/trunk/; revision=14442
* Use _encodings where appropriate.Zac Medico2009-08-191-2/+5
| | | | svn path=/main/trunk/; revision=14100