| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This is part of a cleanup to enable pylint. This is only stdlib modules;
there are hundreds of unused imports of other modules but its less clear
how safe those are to remove due to side effects.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: If9bee83bbbe1620b34a0f8d153637909af2b8512
Closes: https://github.com/gentoo/portage/pull/585
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Since ForkProcess now receives process exit status in the
_proc_join_done method instead of the _async_waitpid_cb method,
_EbuildFetcherProcess needs to emit eerror messages there
instead.
Fixes: bde44b75407d ("ForkProcess: replace os.fork with multiprocessing.Process (bug 730192)")
Bug: https://bugs.gentoo.org/730192
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
If the future was cancelled, then avoid a possible ValueError
when accessing proc.exitcode.
Fixes: f587ebf3d492 ("MergeProcess: handle RETURNCODE_POSTINST_FAILURE in _proc_join_done")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Since ForkProcess now receives process exit status in the
_proc_join_done method instead of the _async_waitpid_cb method,
MergeProcess needs to handle RETURNCODE_POSTINST_FAILURE there
instead.
Fixes: 3561071e07ad ("MergeProcess: replace os.fork with multiprocessing.Process (bug 730192)")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Fix the MergeProcess _spawn method to call the superclass _spawn
method, in order to replace os.fork with multiprocessing.Process,
promoting a healthy state for the forked interpreter.
Bug: https://bugs.gentoo.org/730192
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Do not inherit from object in py3.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: I52c8f46e16fa1dc9c2b90a6c9a5cdf4a417050a0
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
With this branch we will unable to pass 2.7 as the old style classes are
gone.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: I498bd6f4d7b674a0b19d56b70940d9e7cbfc719c
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Inheriting from object is not required in py3.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: Ia12500d590ef3b7f5852b6af03801d40a8af8fa2
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
In python3 inheriting from object is no longer required.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: Id489d4103d975a751be148205694cb6a20d33b31
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Fixes: 788c0e8bb07b ("Remove from __future__ import unicode_literals")
Bug: https://bugs.gentoo.org/733370
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Reported-by: Sam James <sam@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace os.fork with multiprocessing.Process, in order to leverage
any pre-fork and post-fork interpreter housekeeping that it provides,
promoting a healthy state for the forked interpreter.
Since multiprocessing.Process closes sys.__stdin__, fix relevant
code to use the portage._get_stdin() compatibility function.
In case there's a legitimate need to inherit stdin for things like
PROPERTIES=interactive support, create a temporary duplicate of
fd_pipes[0] when appropriate, and restore sys.stdin and sys.__stdin__
in the subprocess.
Bug: https://bugs.gentoo.org/730192
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
The message has changed in desktop-file-utils-0.25.
See: https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/commit/e935a1b0c300d8fc97661e01a8200af14876e627
Bug: https://bugs.gentoo.org/733154
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://github.com/gentoo/portage/pull/577
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/576
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://github.com/gentoo/portage/pull/575
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Eliminate the most of py2/py3 conditions in the code. Leave a few
where the relevant code is unclear, they will be addressed later.
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/574
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
This solves doins test failures triggered in travis-ci when doins
executed with /usr/bin/python instead of PORTAGE_PYTHON.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Replace basestring and _unicode hacks with str, and long with int.
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/570
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
time.monotonic() is available since py3.3, so there's no need for
the compat anymore.
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/569
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each of these functions is called repeatedly with the same arguments
many times. Cache sizes were selected to minimize memory use increase,
while still providing about the same speedup compared to a cache with
unbounded size. "emerge -uDvpU --with-bdeps=y @world" runtime decreases
from 44.32s -> 29.94s -- a 48% speedup, while the maximum value of the
RES column in htop increases from 280 MB -> 290 MB.
"emerge -ep @world" time slightly decreases from 18.77s -> 17.93, while
max observed RES value actually decreases from 228 MB -> 214 MB (similar
values observed across a few before/after runs).
Bug: https://bugs.gentoo.org/732378
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both variables do *not* include the package's category. So $PN,
instead of
x11-base/xorg-server
returns
xorg-server
Same goes for $P.
This commit fixes the error which was introduced by
84b9b5c2a ("man/ebuild.5: Improvements to the ebuild(5) man page").
Bug: https://bugs.gentoo.org/731246
Closes: https://github.com/gentoo/portage/pull/567
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
It should be pretty safe to drop support for python2.7 at this point.
Bug: https://bugs.gentoo.org/731114
Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Reviewed-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, if 'sync-git-verify-commit-signature' is set to anything
other than 'yes', 'no', 'true', or 'false', its value is ignored
silently and nothing is verified because the option defaults to 'false'.
Introduce a check to CheckGitConfig that warns the user if their input
is invalid.
Bug: https://bugs.gentoo.org/703698
Signed-off-by: Wynn Wolf Arbor <wolf@oriole.systems>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Valid values for boolean options in repos.conf are currently not managed
in a consistent manner. Some options only support 'true' and 'false',
whilst others additionally support 'yes' and 'no'. Using the latter
forms on options that do not support them will lead to unexpected
behaviour. For example, an option checking for 'true' will be disabled
when 'yes' is used. This is counter-intuitive and adds additional
burden: the user has to look up in the manual which form is accepted by
which option.
Have all boolean options consistently accept 'yes', 'no', 'true', and
'false' and make sure to document this in the portage(5) manual.
Additionally, document the default value for each.
Signed-off-by: Wynn Wolf Arbor <wolf@oriole.systems>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Use sort and comm with temporary files in order to compare lists
of docompress -x and precompressed files, since the file lists
can be extremely large. Also strip ${D%/} from paths in order to
reduce length.
Bug: https://bugs.gentoo.org/721516
Suggested-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/729852
Reported-by: rnddim@gmail.com
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Use ${REPLY%.ecompress} to correctly strip the .ecompress suffix.
Fixes: 5508bf7a6db5 ("ecompress: ignore docompress -x files in precompressed QA check (bug 721516)")
Bug: https://bugs.gentoo.org/721516
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Unnecessary cancellation of _main_task triggered this ResourceWarning
for the ebuild(1) fetch command, since it prevented cleanup of
BuildLogger's internal PipeLogger instance:
sys:1: ResourceWarning: unclosed file <_io.FileIO name=10 mode='rb' closefd=True>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Use sed -f to feed commands to sed via stdin, in order to avoid
the "Argument list too long" error reported in bug 727522.
Fixes: 5508bf7a6db5 ("ecompress: ignore docompress -x files in precompressed QA check (bug 721516)")
Bug: https://bugs.gentoo.org/727522
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Fixes: dd69ce742c62 ("Support PORTAGE_LOG_FILTER_FILE_CMD (bug 709746)")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This variable specifies a command that filters build log output to a
log file. The plan is to extend this to support a separate filter for
tty output in the future.
In order to enable the EbuildPhase class to write elog messages to
the build log with PORTAGE_LOG_FILTER_FILE_CMD support, convert its
_elog method to a coroutine, and add a SchedulerInterface async_output
method for it to use.
Use a new BuildLogger class to manage log output (with or without a
filter command), with compression support provided by PipeLogger.
BuildLogger has a stdin property which provides access to a writable
binary file stream (refers to a pipe) that log content is written to.
Bug: https://bugs.gentoo.org/709746
Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to write to a non-blocking pipe instead of a
log file. This is needed for the purposes of bug 709746,
where PipeLogger will write to a pipe that is drained
by anoher PipeLogger instance which is running in the same
process.
Bug: https://bugs.gentoo.org/709746
Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the coroutine finally clause, do not call remove_writer in cases
where fd has been closed and then re-allocated to a concurrent
coroutine as in bug 716636.
Also, assume that the caller will put the file in non-blocking mode
and close the file when done, so that this function is suitable for
use within a loop.
Bug: https://bugs.gentoo.org/728580
Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While investigating bug 489542, it became clear that the netsurf
eclass is deprecated in spirit if not in fact. All of the newer
netsurf ebuilds use a custom function loaded from a script that is
shipped in netsurf-buildsystem's $FILESDIR to do (some of) what the
eclass used to do. That function probably does belong in an eclass,
but at this point, we should throw this thing out and start from
scratch.
By deprecating the eclass, we make sure that no one else inherits it
during the time it takes to purge the two remaining consumers. Then,
once those are gone, the build system script magic can be put back
into an eclass, and its consumers updated one-at-a-time.
Bug: https://bugs.gentoo.org/489542
Bug: https://bugs.gentoo.org/637824
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
This reverts commit 3e46825a047067a96ed997fe394f85e042e542a8.
We've had reports of emerge hangs, so reverting this for now.
Bug: https://bugs.gentoo.org/709746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|