| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This reverts commit 73f72f526a66b9953a46868cc1390fde2820997f.
Bug: https://bugs.gentoo.org/716636
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
This reverts commit 1681309f252a4e91d7256b895a9af26ef82a9b30.
Bug: https://bugs.gentoo.org/716636
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
This reverts commit 97587a47fcd00d070c081ad3933e4036cf0f8e81.
Bug: https://bugs.gentoo.org/716636
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
This reverts commit e24859eaa03ec86e10d842296f5570dd98bed4b7.
Bug: https://bugs.gentoo.org/716636
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/713726
Closes: https://github.com/gentoo/portage/pull/536
Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Add a _main coroutine method and make the PipeLogger instance
a local variable.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert SpawnProcess to use the async_start method, since
eventually this method will need to be a coroutine in order to write
messages to the build log as discussed in bug 709746.
Also update AbstractEbuildProcess, AsynchronousLock,
BinpkgExtractorAsync, BinpkgFetcher, EbuildFetcher,
IterCompletedTestCase, AsyncFunction, and FileDigester for
compatibility with SpawnProcess async_start.
Bug: https://bugs.gentoo.org/709746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Also, fix AsynchronousTask.async_start to handle cancellation of the
_async_start coroutine, ensuring that start and exit listeners are
notified in this case (otherwise RetryForkExecutorTestCase will hang).
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 start listeners need to run after _start_async has
completed in case they rely on any state that _start_async
has created (same goes for _start).
Fixes: d66e9ec0b105 ("AsynchronousTask: add coroutine async_start method")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the _start method to an _async_start coroutine, since
eventually this method will need to be a coroutine in order to write
messages to the build log as discussed in bug 709746.
Also convert SequentialTaskQueue to use the async_start method,
which is now required in order to start EbuildPhase instances.
Bug: https://bugs.gentoo.org/709746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Convert the _start method to an _async_start coroutine, since
eventually this method will need to be a coroutine in order to write
messages to the build log as discussed in bug 709746.
Bug: https://bugs.gentoo.org/709746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add coroutine async_start coroutine method which calls an _async_start
template method. Eventually, subclasses having _start implementations
that need to write to a build log will be required to implement an
_async_start coroutine method to replace the _start method as
discussed in bug 709746.
Bug: https://bugs.gentoo.org/709746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Un-reverse traversal order for @profile @selected @system.
Bug: https://bugs.gentoo.org/649622
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make depclean traverse dependencies in the same order as update
actions, in order to ensure consistency in decisions which are
dependent on the order of dependency evaluation due to inconsistent
use of || preferences in different packages.
In unit tests, update test_virtual_w3m_realistic to assert that
the order of graph traversal is deterministic and consistent
between update and removal (depclean) actions.
Bug: https://bugs.gentoo.org/649622
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Traverse the unordered set returned from PackageSet.getNonAtoms()
in sorted order, for more consistent results. Use a reverse sort
since we pop these sets from a stack.
Bug: https://bugs.gentoo.org/649622
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Traverse the unordered set returned from PackageSet.getAtoms()
in sorted order, for more consistent results.
Bug: https://bugs.gentoo.org/649622
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support FEATURES=qa-unresolved-soname-deps so that it's possible to
disable the QA warning that was introduced for bug 704320. This is
useful for systems that may have incomplete PROVIDES metadata due
to alternative package managers or experimentation with a new
architecture.
Bug: https://bugs.gentoo.org/708448
Bug: https://bugs.gentoo.org/704320
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Fixes: 1342b456c460 ("Remove --update greedy SLOTs code from depgraph.select_files()")
Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This solves common name collisions introduced by GLEP 81 user and group
management packages.
TODO: Provide user configuration so that users an ignore name
collisions with selected categories like app-emacs or dev-haskell.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prefer choices that include a slot upgrade when appropriate, like for
the || ( llvm:10 ... llvm:7 ) case reported in bug 706278. In order
to avoid pulling in inappropriate slot upgrades, like those which
should only be pulled in with --update and --deep, add a want_update
flag to each choice which is True for choices that pull in a new slot
for which an update is desirable.
Mark the test case for bug 480736 as todo, since the "undesirable"
slot upgrade which triggers a blocker conflict in this test case is
practically indistinguishable from a desirable slot upgrade. This
particular blocker conflict is no longer relevant, since current
versions of media-libs/libpostproc are no longer compatible with
any available media-video/ffmpeg slot. In order to solve this test
case, some fancy backtracking (like for bug 382421) will be required.
Bug: https://bugs.gentoo.org/706278
Bug: https://bugs.gentoo.org/480736
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example output for maven-bin-3.6.2 (bug 704618):
* QA Notice: Unresolved soname dependencies:
*
* /usr/share/maven-bin-3.6/lib/jansi-native/freebsd32/libjansi.so: libc.so.7 libutil.so.9
* /usr/share/maven-bin-3.6/lib/jansi-native/freebsd64/libjansi.so: libc.so.7 libutil.so.9
*
This warning comes up when a library or executable has one or
more soname dependencies (found in its NEEDED.ELF.2 metadata)
that could not be resolved by usual means. If you run ldd
on files like these then it will report a "not found" error
for each unresolved soname dependency. In order to correct
problems with soname dependency resolution, use one or more
of the approaches described in the following sections.
Content of the NEEDED.ELF.2 metadata file may be useful
for debugging purposes. Find the NEEDED.ELF.2 file in the
${D}/../build-info/ directory after the ebuild src_install
phase completes, or in the /var/db/pkg/*/*/ directory for an
installed package. Each line of the NEEDED.ELF.2 file contains
semicolon separated values for a single ELF file. The soname
dependencies are found in the DT_NEEDED column:
E_MACHINE;path;DT_SONAME;DT_RUNPATH;DT_NEEDED;multilib category
External dependencies
For packages that install pre-built binaries, it may be possible
to resolve soname dependencies simply by adding dependencies
for one or more other packages that are known to provide the
needed sonames.
Removal of unecessary files
For packages that install pre-built binaries, it may be possible
to resolve soname dependencies simply by removing unnecessary
files which have unresolved soname dependencies. For example,
some pre-built binary packages include binaries intended for
irrelevant architectures or operating systems, and these files
can simply be removed because they are unnecessary.
Addition of DT_RUNPATH entries
If the relevant dependencies are installed in a location that
is not included in the dynamic linker search path, then it's
necessary for files to include a DT_RUNPATH entry which refers
to the appropriate directory. The special $ORIGIN value can
be used to create a relative path reference in DT_RUNPATH,
where $ORIGIN is a placeholder for the directory where the
file having the DT_RUNPATH entry is located.
For pre-built binaries, it may be necessary to fix up
DT_RUNPATH using patchelf --set-rpath. For example, use
patchelf --set-rpath '$ORIGIN' if a given binary should link
to libraries found in the same directory as the binary itself,
or use patchelf --set-rpath '$ORIGIN/libs' if a given binary
should link to libraries found in a subdirectory named libs
found in the same directory as the binary itself.
For binaries built from source, a flag like
-Wl,-rpath,/path/of/directory/containing/libs will create
binaries with the desired DT_RUNPATH entry.
Addition of DT_SONAME settings
If a package installs dynamic libraries which do not
set DT_SONAME, then this can lead to unresolved soname
dependencies. For dynamic libraries built from source, a flag
like -Wl,-soname=foo.so.1 will create a DT_SONAME setting. For
pre-built dynamic libraries, it may be necessary to fix up
DT_SONAME using patchelf --set-soname.
Adjustment to Portage soname resolution logic
It may be necessary to adjust Portage soname resolution logic
in order to account for special circumstances. For example,
Portage soname resolution tolerates missing DT_SONAME for
dynamic libraries that a package installs in a directory that
its binaries reference via DT_RUNPATH. This behavior is useful
for packages that have internal dynamic libraries stored in
a private directory. An example is ebtables, as discussed in
bug 646190.
Bug: https://bugs.gentoo.org/704320
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|