summaryrefslogtreecommitdiffstats
path: root/pym/portage/util
Commit message (Collapse)AuthorAgeFilesLines
* RepoConfigLoader: raise PermissionDenied moreZac Medico2013-01-241-0/+27
|
* Use unicode_literals more.Zac Medico2013-01-182-11/+13
| | | | | This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.
* emerge --info: show free ram/swap, bug #451048Zac Medico2013-01-161-0/+80
|
* Revert "_ctypes: don't cache library, bug #448858"v2.2.0_alpha150Zac Medico2013-01-101-4/+6
| | | | | | | | This reverts commit 9e37cca4f54260bd8c45a3041fcee00938c71649. As noted in bug #448858, comment #14, dlclose is not called automatically, so we may as well cache our library handles. In order to protect ourselves, we use a fork since commit 7ebb2f54877edb28621c33e380f8777b1b1dc201.
* Add emirrordist, a tool for mirroring distfiles.Zac Medico2013-01-092-0/+62
| | | | | Special thanks to Brian Harring, author of the mirror-dist program from which emirrordist is derived.
* PipeLogger: handle file object for input_fdZac Medico2013-01-071-4/+12
|
* _keep_scheduling: check _terminated.is_set()Zac Medico2013-01-061-2/+2
| | | | | This ensures that scheduling loops terminate as soon as possible after an interrupt is received.
* Handle os.write() return code with loop.Zac Medico2013-01-051-6/+4
|
* Add async FileDigester class.Zac Medico2013-01-051-0/+73
|
* SchedulerInterface: use loop for proxied attrsZac Medico2013-01-041-16/+9
|
* Enable FD_CLOEXEC for non-blocking pipes.Zac Medico2013-01-032-4/+21
|
* EventLoop: enable FD_CLOEXEC on epoll fdZac Medico2013-01-031-0/+11
|
* EventLoop.iteration: no IO blocking if possibleZac Medico2012-12-301-4/+18
| | | | | | | | Avoid blocking for IO if there are any timeout or idle callback events available to process. This will prevent starvation of the idle callbacks, which are much more common since commit a3100be184ba1cac2f672f0a1cadcf01690c6d3f. We don't want these idle callbacks to be delayed by long periods of IO blocking.
* Add run_main_scheduler helper function.Zac Medico2012-12-281-0/+41
|
* _ctypes: don't cache library, bug #448858Zac Medico2012-12-281-6/+4
|
* PipeReaderBlockingIO handle threading ImportErrorZac Medico2012-12-271-1/+5
|
* EventLoop.iteration(): avoid busy waitingZac Medico2012-12-271-14/+40
| | | | | | | | | | | | | | | | | | | In order to avoid blocking forever when may_block is True (the default), callers must be careful to ensure that at least one of the following conditions is met: 1) An event source or timeout is registered which is guaranteed to trigger at least on event (a call to an idle function only counts as an event if it returns a False value which causes it to be stop being called) 2) Another thread is guaranteed to call one of the thread-safe methods which notify iteration to stop waiting (such as idle_add or timeout_add). These rules ensure that iteration is able to block until an event arrives, without doing any busy waiting that would waste CPU time. This will fix busy waiting which would be triggered by PopenPipeBlockingIOTestCase when waiting for the thread from PipeReaderBlockingIO to call idle_add.
* Add PipeReaderBlockingIO, Jython experimentation.Zac Medico2012-12-272-3/+100
|
* EventLoop: thread-safe idle_add and timeout_addZac Medico2012-12-261-68/+97
| | | | | | This may be useful for using threads to handle blocking IO with Jython, since Jython lacks the fcntl module which is needed for non-blocking IO (see http://bugs.jython.org/issue1074).
* portage.util.movefile.movefile(): Try to preserve mtime of symlinks with ↵Arfrever Frehtes Taifersar Arahesis2012-11-301-3/+9
| | | | Python >=3.3.
* Fix return value of portage.util.movefile.movefile() for symlinks with ↵Arfrever Frehtes Taifersar Arahesis2012-11-291-2/+5
| | | | Python >=3.3.
* EventLoop: handle Linux 2.4 errno 38 for epollZac Medico2012-11-221-8/+19
|
* validate_desktop_entry: ignore Encoding keyZac Medico2012-11-141-0/+1
| | | | See bug #443100.
* validate_desktop_entry: handle df-utils-0.21 hintZac Medico2012-10-281-1/+3
|
* Add portage.util._ctypes module, for bug #439584.Zac Medico2012-10-251-0/+47
|
* PipeLogger/Reader: remove redundant isAlive()Zac Medico2012-10-181-3/+0
| | | | Parent class AbstractPollTask has equivalent implementation.
* SpawnProcess: split out a PipeLogger classZac Medico2012-10-181-0/+149
| | | | | | The copyright dates for these classes begin in 2008, since SpawnProcess code is derived from the EbuildFetcherAsync class which was added in commit e4edadf5ae7063f375d76be151c6d0e949980ecf in 2008.
* PopenProcess: child_watch_add if no pipe_readerZac Medico2012-10-171-4/+6
|
* CompositeTask._start_task: propagate schedulerZac Medico2012-10-161-0/+4
|
* PopenProcess: integrate PipeReader supportZac Medico2012-10-161-2/+14
|
* Add missing PopenProcess class from last commit.Zac Medico2012-10-151-0/+15
|
* chk_updated_info_files: move to separate fileZac Medico2012-10-141-0/+138
|
* display_preserved_libs: move to separate fileZac Medico2012-10-141-0/+79
|
* PollScheduler: disable default _loadavg_latencyZac Medico2012-10-081-1/+3
| | | | | | Move the 30 second default to the Scheduler class, since that's the only place that it's currently needed (all other schedulers have relatively short-running jobs).
* ForkProcess: set _exit finally block before forkZac Medico2012-10-081-27/+38
| | | | This is the most reliable way to handle the race condition.
* ForkProcess: increase scope of try/finally/_exitZac Medico2012-10-081-9/+11
| | | | | This minimizes the probability of triggering irrelevant finally blocks from earlier in the call stack (bug #345289).
* PollScheduler: rename sched_iface to _sched_ifaceZac Medico2012-10-071-7/+7
| | | | | | It isn't used externally anymore, since SchedulerInterface is used directly in those places now. Many of the self.sched_iface references updated here, it's more appropriate to use self._event_loop.
* PollScheduler: split out SchedulerInterfaceZac Medico2012-10-071-0/+86
|
* AsyncScheduler: remove useless __slots__Zac Medico2012-10-052-6/+0
| | | | | | It's not allowed for AsyncScheduler to inherit from two classes that define __slots__, so it useless to define __slots__ for AsyncScheduler and subclasses.
* TaskScheduler: inherit AsyncSchedulerZac Medico2012-10-051-0/+22
| | | | This allows the QueueScheduler class to be eliminated.
* AsyncScheduler: poll in _schedule_tasksZac Medico2012-10-031-0/+3
| | | | Triggers cleanup and exit listeners if there's nothing left to do.
* AsyncScheduler: implement _pollZac Medico2012-10-031-0/+5
|
* AsyncScheduler: use _termination_checkZac Medico2012-10-031-1/+1
| | | | | The _terminate_tasks method is always supposed to be called via _termination_check.
* AsyncScheduler: source_remove in _waitZac Medico2012-10-031-0/+8
|
* EbuildFetcher/MergeProcess: inherit ForkProcessZac Medico2012-10-031-0/+2
| | | | | Also add missing __slots__ to ForkProcess. TODO: Share code between ForkProcess and MergeProcess.
* egencache: add --update-manifests, bug #436918Zac Medico2012-10-033-0/+138
| | | | | | | | | | Update manifest files, and sign them if signing is enabled. This supports parallelization if enabled via the --jobs option. The --thin-manifests and --sign-manifests options may be used to manually override layout.conf settings. There's also a new --strict-manifests option that may be used to manually override the "strict" FEATURES setting, a --gpg-key option to override PORTAGE_GPG_KEY, and a --gpg-dir option to override PORTAGE_GPG_DIR.
* UseManager: /etc/portage/profile extended syntaxZac Medico2012-09-261-5/+11
| | | | | If /etc/portage/profile/eapi does not exist, then support extended atom syntax. This will fix bug #436330.
* EventLoop: fix busy loop waiting for child pidZac Medico2012-09-252-14/+18
| | | | | | This fixes a case where EventLoop could consume 100% CPU while waiting for a child process. It also fixes timeout calculations in python 2.x, where it was using integer division instead of float.
* env_update: use eroot variable moreZac Medico2012-09-231-10/+7
|
* env_update: scan all dirs starting with "lib"Zac Medico2012-09-231-4/+19
| | | | | Also see bug #435834 and commit 7fb9758506341ffc05585fbd18f2be58ef0e16c2.