| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This reverts commit 27a6ee3d09ff79b6addb2696a10fcc3f46e5ca91.
Bug: https://bugs.gentoo.org/716636
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
This reverts commit 899d5e61010a85702e7c83506d2214ede179c964.
Bug: https://bugs.gentoo.org/716636
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use UTS namespace to override hostname when network-sandbox is enabled.
Set it to 'localhost' as that has a better chance of being present
in /etc/hosts. This fixes tests in some packages that try to connect
to localhost via hostname obtained using gethostname(), e.g. docker-py,
and suffer resolution problems due to the system hostname not being
defined in /etc/hosts.
Closes: https://github.com/gentoo/portage/pull/539
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Automatically reindex for commit mode, but not for other modes
were the user might not want changes to be staged in the index.
Bug: https://bugs.gentoo.org/712106
Suggested-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Fixes: 59e9452fda79 ("_lockfile_was_removed: return fstat result (bug 714480)")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Raise TryAgain if the current inode is already locked by the current
process, since in this case the lock will not behave as intended with
the default fcntl.lockf function. With the alternative fcntl.flock
function, TryAgain is raised earlier.
Bug: https://bugs.gentoo.org/714480
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Index each locked file by inode so that it's possible to detect when
there's an attempt to lock the same inode twice, since in that case
the lock will not behave as intended with the default fcntl.lockf
function.
Bug: https://bugs.gentoo.org/714480
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Return a tuple that includes the fstat result, which can be used to
detect when there's an attempt to lock the same inode more than once
by the same process, since in that case the lock will not behave as
intended with the default fcntl.lockf function.
Bug: https://bugs.gentoo.org/714480
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Adjust the regular expression to avoid overly-greedy .+ groups,
so that is will properly replace all occurrences, as necessary
for the purposes of bug 713726 since PORTAGE_BINHOST may contain
multiple values.
Bug: https://bugs.gentoo.org/713726
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the userpriv UID has appropriate permission for files
created in $HOME during privileged phases like pkg_setup, in the
same way as for $T. This prevents potential permission issues for
programs invoked during unprivileged phases, and it improves
alignment with PMS which specifies identical behavior for both
$HOME and $T.
Bug: https://bugs.gentoo.org/713100
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>
|
|
|
|
| |
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>
|