aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Rename pym→lib, for better distutils-r1 interoperabilityMichał Górny2018-07-189-990/+0
| | | | Closes: https://github.com/gentoo/portage/pull/343
* AsynchronousTask: add async_wait() method (bug 653856)Zac Medico2018-04-251-1/+1
| | | | | | | | | | | | Since the AsynchronousTask.wait() method is prone to event loop recursion, deprecate it, and add an async_wait() method method to replace it. Instead of using task.wait() in order to implicitly run the event loop, now loop.run_until_complete(task.async_wait()) will be used to explicitly run the event loop. This explicit approach will make it more obvious when code will trigger event loop recursion which would not be compatible with asyncio's default event loop. Bug: https://bugs.gentoo.org/653856
* EbuildBuildDir: remove synchronous lock method (bug 614112)Zac Medico2018-04-221-1/+1
| | | | | | | | | | The synchronous lock method can trigger event loop recursion if the event loop is already running, which is incompatible with asyncio's default event loop. Therefore, migrate the last consumers to use the async_lock method, and remove the synchronous lock method. Bug: https://bugs.gentoo.org/614112 Bug: https://bugs.gentoo.org/649588
* EbuildBuildDir: remove synchronous unlock method (bug 614108)Zac Medico2018-04-201-1/+1
| | | | | | | | | | The synchronous unlock method can trigger event loop recursion if the event loop is already running, which is incompatible with asyncio's default event loop. Therefore, migrate the last consumers to use the async_unlock method, and remove the synchronous unlock method. Bug: https://bugs.gentoo.org/614108 Bug: https://bugs.gentoo.org/649588
* EventLoop: implement call_later for asyncio compat (bug 591760)Zac Medico2018-02-241-6/+6
| | | | Bug: https://bugs.gentoo.org/591760
* Make manifest-required-hashes configurableMichał Górny2017-11-071-0/+1
| | | | | | | | | | The set of required hashes specify which hashes must be present for a distfile not to be refetched. It makes little sense to hardcode this value, and it is mostly useful for transition periods, so make it configurable via layout.conf and default to all hashes in manifest-hashes. Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Future: implement add_done_callback for asyncio compat (bug 591760)Zac Medico2017-03-261-2/+1
| | | | | | | | | | | | | | | | | Implement the add_done_callback and remove_done_callback methods, since they are required in order to make further progress toward asyncio compatibility. Also implement the AbstractEventLoop create_future method for the EventLoop class, so that it returns an instance of _EventLoopFuture. EventLoop currently does not implement some of the asyncio.AbstractEventLoop methods that asyncio.Future requires for its add_done_callback implementation, and the create_future method conveniently solves this problem. X-Gentoo-bug: 591760 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591760 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* EventLoop: add run_until_complete method (bug 591760)Zac Medico2016-08-231-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | This emulates the asyncio.AbstractEventLoop.run_until_complete(future) interface, which will make it possible to reduce latency in situations where it is desirable for a loop to exit at the earliest opportunity. The most tangible benefit of this change is that it provides a migration path to asyncio, which will allow us to rely on a standard library instead of our own internal event loop implementation. In order to migrate to asyncio, more work is planned: * Migrate all internal use of the EventLoop.iteration method to the new run_until_complete(future) method, and remove the EventLoop.iteration method (or make it private as long as it's needed to implement run_until_complete for older python versions). * Implement all EventLoop methods using asyncio.AbstractEventLoop methods (but keep existing implementations for use with older python). X-Gentoo-bug: 591760 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591760 Acked-by: Alexander Berntsen <bernalex@gentoo.org>
* refresh many URIs in the code baseMike Frysinger2016-06-281-1/+1
| | | | | Use https where available, and update old links (like www.gentoo.org) to point to the new location.
* DoebuildFdPipesTestCase: use extra pipe for test outputZac Medico2016-01-161-18/+18
| | | | | | Since commit 3767128cf08a0a21559eb9c41ba393dcabc6f087, this test has failed due to additional output produced by src_install. Fix it to use a separate pipe for test output.
* portage.repository.config.RepoConfig: Delete user_location attribute and ↵Arfrever Frehtes Taifersar Arahesis2015-12-081-2/+2
| | | | consistently use location attribute everywhere.
* Respect PYTHONDONTWRITEBYTECODE in test suite.Arfrever Frehtes Taifersar Arahesis2015-12-023-3/+6
|
* make.defaults: negative incrementals in USE_EXPAND (530222)Zac Medico2014-11-271-0/+132
| | | | | | | | | | | | | | | Previously, USE_EXPAND variable settings in profile make.defaults only supported positive incremental settings. This patch adds support for negative settings like PYTHON_TARGETS="-python3_3", which brings behavior into alignment with PMS. Notably, this patch does not change behavior for settings in make.conf. In make.conf, settings to USE_EXPAND variables remain entirely non-incremental. PMS does not govern make.conf behavior. X-Gentoo-Bug: 530222 X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=530222 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* tests: Append .py to files that need to be installedMichał Górny2014-09-111-0/+0
| | | | | Append .py to the runTests script and __test__ files so that they could be easily picked up by setup.py.
* config.setcpv: fix bug #522362Zac Medico2014-09-091-1/+70
| | | | | | | | | | Fix config.setcpv to regenerate USE settings in order to account for package.env USE settings from the previous package instance. X-Gentoo-Bug: 522362 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=522362 Acked-by: Alexander Berntsen <bernalex@gentoo.org> Acked-by: Brian Dolbec <dolsen@gentoo.org>
* Use empty value of masters attribute in test suite when possible.Arfrever Frehtes Taifersar Arahesis2014-01-071-1/+2
|
* tests: add assertExists/assertNotExists helpersMike Frysinger2013-10-161-1/+1
| | | | | | | | This makes it easy to assert the state of paths and when things fail, get a good error message in the process (without having to dig into temp dirs by hand). This has largely been cribbed from ChromiumOS's chromite module.
* test_doebuild_fd_pipes: bsd compatZac Medico2013-07-251-0/+16
|
* Use consistent paths of repositories in test suite and clean some code.Arfrever Frehtes Taifersar Arahesis2013-07-131-3/+3
|
* Use PORTAGE_REPOSITORIES in test suite.Arfrever Frehtes Taifersar Arahesis2013-07-131-6/+8
|
* test_doebuild_fd_pipes: test qmergev2.2.0_alpha187Zac Medico2013-07-071-2/+2
|
* test_doebuild_fd_pipes: test pkg_infoZac Medico2013-07-071-2/+4
|
* doebuild: support 'nofetch' phaseZac Medico2013-07-071-1/+2
|
* Use sys.__std* streams for fileno().Zac Medico2013-07-071-2/+8
|
* DoebuildFdPipesTestCase: fix docstringZac Medico2013-07-061-6/+6
|
* doebuild: fix fd_pipes support, bug #475812Zac Medico2013-07-061-0/+118
| | | | | The fd_pipes was previously unsupported with returnpid=False. Now it's fixed to pass fd_pipes down to the appropriate places.
* tests: clean up style a bit (mostly poor/inconsistent spacing)Mike Frysinger2013-04-281-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* DoebuildSpawnTestCase: also call spawn_nofetchZac Medico2013-01-101-12/+27
|
* Revert "test_ipc_daemon: handle fork/finally race"Zac Medico2012-10-081-9/+0
| | | | | This reverts commit 56fbe3fe63adf4e7c5b47400182cd857d145d5b0. The race is now handled internally by spawn and ForkProcess.
* test_ipc_daemon: handle fork/finally raceZac Medico2012-10-081-0/+9
|
* PollScheduler: rename sched_iface to _sched_ifaceZac Medico2012-10-071-4/+2
| | | | | | 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.
* Substitute SchedulerInterface for PollScheduler.Zac Medico2012-10-071-3/+4
| | | | | | SchedulerInterface suffices for all of these cases. EventLoop(main=False) is used for thread safety where API consumers may be using threads.
* Substitute EventLoop for PollScheduler.Zac Medico2012-10-051-3/+2
| | | | | EventLoop suffices for all of these cases. EventLoop(main=False) is used for thread safety where API consumers may be using threads.
* PollScheduler: remove register/unregister methodsZac Medico2012-10-051-2/+1
| | | | | | | These methods were aliases for the EventLoop io_add_watch and source_remove methods. Migrating to the EventLoop method names allows an EventLoop instance to substitute for a PollScheduler inside subclasses of AbstractPollTask.
* TaskScheduler: inherit AsyncSchedulerZac Medico2012-10-051-22/+36
| | | | This allows the QueueScheduler class to be eliminated.
* test_ipc_daemon: implement internal SleepProcessZac Medico2012-10-041-3/+12
| | | | | Emulate the sleep command, in order to ensure a consistent return code when it is killed by SIGTERM (see bug #437180).
* test_ipc_daemon: increase sleep for bug #436334Zac Medico2012-09-261-1/+3
|
* _pkg_str: pass in config + metadata with KEYWORDSZac Medico2012-08-241-0/+2
| | | | | This will be needed in order to support stable use.mask/force for bug #431078.
* ConfigTestCase: fix warning about manifest-hashesZac Medico2012-07-041-2/+2
|
* AsynchronousTask: don't wait for exit statusZac Medico2012-02-131-4/+6
| | | | | | Synchronous waiting for status is not supported, since it would be vulnerable to hitting the recursion limit when a large number of tasks need to be terminated simultaneously, like in bug #402335.
* IpcDaemonTestCase: init start_time earlierZac Medico2012-02-081-2/+2
| | | | | | Since commit 4620d6aba1c5c10344e311585516ee43819b703c, the SequentialTaskQueue.add() method starts the task immediately, so initialize start_time before that happens.
* test_config: fix AttributeError: 'str'Zac Medico2012-01-121-1/+2
|
* RepoConfig.update(): copy more attributesZac Medico2011-12-271-0/+2
| | | | | | | | | | This fixes a regression since commit 10246cd535f909dda8bd05de617c32d2b8a56b4a which caused layout.conf settings such as thin-manifests to be ignored for repositories that had repos.conf settings that did not specify the repository location. In order to trigger this case, ResolverPlayground has been modified to omit the location of each repository in the repos.conf file that it generates.
* _pty.py: remove _test_pty_eof()Zac Medico2011-12-221-26/+0
| | | | | | | | | | | If array.fromfile() is not used, then _test_pty_eof() is useless. This function was for runtime detection of python issue 5380: http://bugs.python.org/issue5380 However, array.fromfile() use has since been abandoned due to bugs that exist in all known versions of Python (including Python 2.7 and Python 3.2). See PipeReaderArrayTestCase, for example.
* _test_pty_eof: use os.read, not array.fromfileZac Medico2011-12-161-27/+2
| | | | | | We have abandoned array.fromfile() due to bugs that exist in all known versions of Python (including Python 2.7 and Python 3.2). See PipeReaderArrayTestCase, for example.
* PtyEofFdopenUnBufferedTestCase: PyPy TODOZac Medico2011-12-151-0/+6
| | | | https://bugs.pypy.org/issue956
* locks.py: fix hardlink locks for bug #394195Zac Medico2011-12-132-0/+14
| | | | | | This updates the hardlink locking code to support the non-blocking, lockfile(wantnewlockfile=False), and lockfile(file_object) behaviors which are used by portage code.
* Use portage.shutil for safer unicode handling.Zac Medico2011-12-101-2/+2
|
* parse_layout_conf: fix profile-formats warningZac Medico2011-10-271-0/+1
|
* test_config: test PORTDIR default mastersZac Medico2011-10-251-0/+5
|