| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
In _async_wait, call self.wait() immediately so that the stack
trace for an InvalidStateError will contain useful debugging
information. Since commit 46903f3e5622, exit listeners are
invoked via call_soon, so it's no longer unecessary for
_async_wait to invoke self.wait() via call_soon.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Make eqwarn output to the build log regardless of --quiet, via echo
to stderr instead of __vecho. This __vecho usage was originally
introduced in commit c53f52941c88, which was during the time when
build output went to the tty regardless of --quiet mode (that
changed in commit 0398470e5029).
Bug: https://bugs.gentoo.org/713818
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For files returned by git diff-index, call git update-index in order
to ensure that the index reflects the state on disk. This will prevent
incorrect assumptions in cases where the index is missing or stale for
some reason. Since repoman uses this information to decide when to
update copyright header dates, this can prevent spurious copyright
header updates.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Bug: https://bugs.gentoo.org/712106
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Apply secure PORTAGE_WORKDIR_MODE permissions to PORTAGE_BUILDDIR,
since the child directory ${D} and its children may have vulnerable
permissions as reported in bug 692492.
Bug: https://bugs.gentoo.org/692492
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Omit the zstd --long=31 argument for decompression on 32-bit
architectures, since the latest version of zstd will otherwise
abort with an error on 32-bit architectures.
Bug: https://bugs.gentoo.org/710444
Bug: https://bugs.gentoo.org/634980
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the _wrapped_select_pkg_highest_available_imp method to select an
installed package when appropriate for the current --deep=<depth>
setting, even with --update enabled. This prevents violation of the
current --deep=<depth> setting in cases where an installed package
which satisfies a dependency is masked for any reason.
Bug: https://bugs.gentoo.org/712298
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the clear method is called, cancel any tasks which have not
started yet, in order to ensure that their start/exit listeners are
called. This fixes a case where emerge would hang after SIGINT.
Also fix the CompositeTask _cancel method to react appropriately to
the cancel event when the task has not started yet.
Bug: https://bugs.gentoo.org/711322
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
When addStartListener is called after the task has already exited with
a returncode, immediately schedule the listener to be invoked via
call_soon. This behavior is similar to the Future add_done_callback
method (and addExitListener since commit 5d476c4e5002).
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplify all AsynchronousTask subclasses to use the default
isAlive implementation, which returns True if self.returncode
is not None. This fixes cases where the method would erroneously
return False, leading to issues like bug 711688, where the
CompositeTask isAlive implementation returned False for a
BinpkgPrefetcher instance that was still in the process of
starting via its async_start method.
Fixes: d66e9ec0b105 ("AsynchronousTask: add coroutine async_start method")
Bug: https://bugs.gentoo.org/711688
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
When addExistListener is called after the task has already exited with
a returncode, immediately schedule the listener to be invoked via
call_soon. This behavior is similar to the Future add_done_callback
method.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
For simplicity, use addExitListener instead of add_done_callback, since
addExitListener has been fixed to use call_soon in commit 46903f3e5622.
Note that each addExitListener call occurs *after* a call to the
SequentialTaskQueue add method, since the SequentialTaskQueue needs to
be notified of task exit *first* (see commit 459b3535baa4).
Bug: https://bugs.gentoo.org/711322
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Schedule exit listeners via call_soon, in order to avoid callback races
like the SequentialTaskQueue exit listener race that triggered bug
711322. Callbacks scheduled via call_soon are placed in a fifo queue,
ensuring that they execute in an order that is unsurprising relative to
other callbacks.
Bug: https://bugs.gentoo.org/711322
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This function has not been deprecated, and developers generally have a
good reason for using it. A repoman warning for this is just noise.
No reason was given when this check was added in 2010, and it was requested
by a developer who has since retired.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Reviewed-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Schedule start listeners via call_soon, in order to avoid callback races
like the SequentialTaskQueue exit listener race that triggered bug
711322. Callbacks scheduled via call_soon are placed in a fifo queue,
ensuring that they execute in an order that is unsurprising relative to
other callbacks.
Bug: https://bugs.gentoo.org/711322
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use add_done_callback instead of addExistListener, in order to avoid
callback races like the SequentialTaskQueue exit listener race that
triggered bug 711322. The addExistListener method is prone to races
because its listeners are executed in quick succession. In contrast,
callbacks scheduled via add_done_callback are placed in a fifo
queue, ensuring that they execute in an order that is unsurprising
relative to other callbacks.
Bug: https://bugs.gentoo.org/711322
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use addExitListener to add a _task_exit callback that will be invoked
as soon as the task exits (before the future's done callback is called).
This is required in order for bool(self) to have an updated value for
Scheduler._schedule to base assumptions upon. Delayed updates to
bool(self) is what caused Scheduler to hang as in bug 711322.
This reverts changes in SequentialTaskQueue task queue exit listener
behavior from commit c7e52d046621, so that only the changes necessary
to support async_start remain.
Fixes: c7e52d046621 ("EbuildPhase: add _async_start coroutine")
Bug: https://bugs.gentoo.org/711322
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Suggested-by: Michael 'veremitz' Everitt <gentoo@veremit.xyz>
Bug: https://bugs.gentoo.org/709746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skip the want_update_pkg call when parent is None, since passing
a None parent to want_update_pkg results in an error like this:
File "libdep/dep_check.py", line 513, in dep_zapdeps
if graph_interface.want_update_pkg(parent, avail_pkg):
File "lib/_emerge/depgraph.py", line 5850, in _want_update_pkg
depth = parent.depth or 0
AttributeError: 'NoneType' object has no attribute 'depth'
Fixes: f7d83d75c6b0 ("dep_zapdeps: adjust || preference for slot upgrades (bug 706278)")
Bug: https://bugs.gentoo.org/711400
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Make the _unregister method check if self._files is None, as
necessary for idempotency. This will prevent the AttributeError
reported in bug 711362, which was triggered by recent changes
in callback scheduling order.
Closes: https://bugs.gentoo.org/711362
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Fixes: ec654122c0eb ("fetch: drop privileges early for NFS root_squash (bug 601252)")
Bug: https://bugs.gentoo.org/601252
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
https://bugs.gentoo.org/709334
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Remove call to pdb.set_trace() in exception handler, since it's
not very useful, and always die with a SIGTERM for unexpected
exceptions here.
Bug: https://bugs.gentoo.org/705910
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Display a non-fatal eerror message when EOFError is encountered,
since this need not be fatal.
Bug: https://bugs.gentoo.org/711174
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the super class AbstractPollTask _async_wait method
calls _unregister, it can trigger premature _unregister before
pid status is available. Therefore, only call the super class
_async_wait method after pid status is available. This should
help prevent premature _unregister events that trigger reading
of build logs before they're closed as in bug 658806 and
bug 711174.
Bug: https://bugs.gentoo.org/711174
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Throw asyncio.CancelledError in a cancelled coroutine, ensuring
that the coroutine can handle this exception in order to perform
any necessary cleanup (like close the log file for bug 711174).
Note that the asyncio.CancelledError will only be thrown in the
coroutine if there's an opportunity (yield) before the generator
raises StopIteration.
Also fix the AsynchronousTask exit listener handling for
compatibility with this new behavior.
Fixes: 8074127bbc21 ("SpawnProcess: add _main coroutine")
Bug: https://bugs.gentoo.org/711174
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cancel _main_task in _unregister, in order to ensure that the build
log is properly closed. Note that is analogous to the fix for bug
658806 in commit a9a62e57194c, but behavior related to coroutine
cancellation now plays a role since the PipeLogger is now cancelled
indirectly via _main_task. We still need to verify that coroutine
cancellation will raise an appropriate exception in the coroutine
(asyncio.CancelledError, GeneratorExit, or StopIteration) and also
that the specific coroutine will react appropriately to the
specific exception that will be raised.
Fixes: 8074127bbc21 ("SpawnProcess: add _main coroutine")
Bug: https://bugs.gentoo.org/711174
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/portage/pull/515
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Make the async_lock method use the AsynchronousLock async_start
method in order to avoid event loop recursion.
Fixes: 5c40c3e7e ("SpawnProcess: use async_start method (bug 709746)")
Bug: https://bugs.gentoo.org/711178
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Drop privileges prior to fetch function calls, so that
all necessary operations can succeed when DISTDIR is
on NFS with root_squash enabled.
Bug: https://bugs.gentoo.org/601252
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 support, convert its _elog
method to a coroutine, and add a SchedulerInterface async_output
method for it to use.
Bug: https://bugs.gentoo.org/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>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Add a _main coroutine method and make the PipeLogger instance
a local variable.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Eliminate the _pipe_logger_exit method by overriding the
_async_waitpid method.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|