| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
attribute"
This reverts commit f99eb91227918d5bf0cc531e78bd597c73b7ce1f.
Revert for now as we understand the status quo better, and this
breaks syncing w/ emerge-webrsync. I'll come back to this but I'd
rather work with a known quantity for now than rush a fix.
Bug: https://bugs.gentoo.org/940120
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Left over from FEATURES="cgroup".
Fixes: f8e3b11496bd6d602a690535c4a3bb32bb8e9744
Bug: https://bugs.gentoo.org/894398
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Seen in dev-util/lttng-tools and dev-util/lttng-ust.
The function seems to be available on at least Darwin, FreeBSD, and
OpenBSD.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Seen in dev-lang/erlang, dev-util/lttng-tools, and dev-util/lttng-ust.
The function seems to be available on at least Darwin, FreeBSD, and
OpenBSD.
Bug: https://bugs.gentoo.org/898762
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
|
| |
Seen in dev-db/mariadb. The function seems to be available on Darwin.
Bug: https://bugs.gentoo.org/899772
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
pthread_cond_timedwait_monotonic_np on Linux
Seen in mail-client/thunderbird, www-client/seamonkey, and
www-client/firefox. It seems to be an Android/bionic function.
Bug: https://bugs.gentoo.org/905825
Closes: https://bugs.gentoo.org/932360
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
| |
Reported by Eli.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Values that belong together and may only be changed at the same time
should be combined in a common constant. So let's do this.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1377
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a28a0fd66002 ("JobStatusDisplay: increase the default width
to 100") which attempted to set the default width to 100. However, the
out of bounds check in _set_width() was not adjusted. Therefore, the
default width was effectively still 80.
Fixes: a28a0fd6600242a2e062a0fd2d7d5be95296b7ae
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/933499
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
| |
This fixes PMS compliance and at the same time simplifies the code.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PMS says that "Any unrecognised file format shall be skipped silently."
This wording was added with the draft of what later became EAPI 4:
https://gitweb.gentoo.org/proj/pms.git/commit/?id=634c32f231e1bc94d64588e2b2edf0ad1ca60f1f
The commit message doesn't give any rationale for "silently".
It may well be that the wording is a remnant of the rejected
"unpack --if-compressed" item.
See the discussion in the 2009-04-23 council meeting:
https://projects.gentoo.org/council/meeting-logs/20090423.txt
(starting at 21:35).
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have some code we use for config-impl-decl which can strip color
codes out via sed. This is always necessary for config.log because if
color exists it will still be there.
The assumption was, likely, that build.log as managed by portage will
also be ansifilter'd by portage, and therefore stripping color is
unnecessary. But in fact, some people do like color and intentionally
avoid stripping it. This rendered the QA check effectively broken.
Instead we should make no assumptions, and explicitly strip this too.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1375
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
Adding new attrs as needed. Their name is the same as the
corresponding PMS feature label (if one exists).
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
When a loop argument is not given, use the default asyncio
ensure_future implementation and avoid unnecessary _wrap_loop
usage.
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
When a loop argument is not given, use the default asyncio sleep
implementation and avoid unnecessary _wrap_loop usage.
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit cb0c09d8cecb, _get_running_loop can wrap loops from
asyncio.run, so these loops need to be discarded if they've been
closed.
Fixes: cb0c09d8cecb ("Support coroutine exitfuncs for non-main loops")
Bug: https://bugs.gentoo.org/938761
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Signed-off-by: Allen-Kristjan Päll <akpall+gentoo@fst.ee>
Closes: https://github.com/gentoo/portage/pull/1373
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
This class originated from commit 142d08c0636b and it is unused
since _PortageEventLoop was removed in commit 20204fd8c29.
Fixes: 20204fd8c29 ("Remove unused _PortageEventLoop and _PortageChildWatcher")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ultimately the loop arguments that necessitate the _wrap_loop
function can be removed, because our aim since bug 761538 should
be to eliminate them. Meanwhile, we don't want _wrap_loop to return
redundant AsyncioEventLoop instances if we can easily prevent it.
Therefore, use _safe_loop(create=False) to look up the AsyncioEventLoop
instance associated with the current thread, and avoid creating
redundant instances. This serves to guard against garbage collection
of AsyncioEventLoop instances which may have _coroutine_exithandlers
added by the atexit_register function since commit cb0c09d8cecb from
bug 937740.
If _safe_loop(create=False) fails to associate a loop with the current
thread, raise an AssertionError for portage internal API consumers.
It's not known whether external API consumers will trigger this case,
so if it happens then emit a UserWarning and return a temporary
AsyncioEventLoop instance.
Fixes: cb0c09d8cecb ("Support coroutine exitfuncs for non-main loops")
Bug: https://bugs.gentoo.org/938127
Bug: https://bugs.gentoo.org/937740
Bug: https://bugs.gentoo.org/761538
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
This is useful for bootstrapping purposes, as _ctypes requires a dynamic
linker.
Closes: https://github.com/gentoo/portage/pull/1363
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
| |
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Closes: https://github.com/gentoo/portage/pull/1367
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This behavior is implied by the ordering of QA variables in the man page
since the introduction of QA_SONAME_NO_SYMLINK.
Bug: https://bugs.gentoo.org/924953
Fixes: dcb42a417355510284a35c08a4bf849047122a5c
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
| |
Fixes: 74e29110d86a ("_EbuildFetcherProcess: Suppress CancelledError")
Bug: https://bugs.gentoo.org/937888
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Drop hooks inherited via fork because they can trigger redundant
actions as shown in bug 937891. Note that atexit hooks only work
after fork since issue 83856 was fixed in Python 3.13.
Bug: https://bugs.gentoo.org/937891
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Suppress CancelledError when attempting to cache the
result in the _async_uri_map method. The cancelled
result is returned for the caller to handle.
Bug: https://bugs.gentoo.org/937888
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
There is no need to use SHELL here, and this can actually cause problems
when SHELL is set to "nologin" or "false".
Look for sh in PATH instead.
Bug: https://bugs.gentoo.org/910560
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since an API consumer can cause loops to be instantiated
for non-main threads, support coroutine exitfuncs for each
loop. The included Socks5ServerAtExitThreadedTestCase calls
get_socks5_proxy from a non-main thread, and demonstrates
that coroutine exitfuncs for the resulting non-main loop
will reliably stop the socks5 proxy via atexit hook.
The _thread_weakrefs_atexit function will now make a
temporary adjustment to _thread_weakrefs.loops so that a
loop is associated with the current thread when it is
closing. Also, the _get_running_loop function will now
store weak references to all _AsyncioEventLoop instances
it creates, since each has a _coroutine_exithandlers
attribute that can be modified by atexit_register calls.
Bug: https://bugs.gentoo.org/937740
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle the case where the loop has not been explicitly closed before
exit. In this case, run_exitfuncs previously tried to call coroutine
functions as though they were normal functions, which obvously would
not behave correctly.
Solve this problem by storing the coroutine functions in a separate
_coroutine_exithandlers list that belongs exclusively to the
run_coroutine_exitfuncs function, so that it is safe to close the
loop and call run_coroutine_exitfuncs from inside a run_exitfuncs
hook. A _thread_weakrefs_atexit hook already exists that will close
weakly referenced loops. The _thread_weakrefs_atexit hook is now
fixed to release its lock when it closes a loop, since the same
lock may need to be re-acquired when run_coroutine_exitfuncs runs.
The included test case demonstrates that run_exitfuncs will run
via an atexit hook and correctly terminate the socks5 proxy in a
standalone program using the portage API (like eclean).
Due to a deadlock that will occur if an _exit_function atexit hook
from the multiprocessing module executes before run_exitfuncs, a
portage.process._atexit_register_run_exitfuncs() function needs to
be called in order to re-order the hooks after the first process
has been started via the multiprocessing module. The natural place
to call this is in the ForkProcess class, using a global variable
to trigger the call just once.
Fixes: c3ebdbb42e72 ("elog/mod_custom: Spawn processes in background")
Bug: https://bugs.gentoo.org/937384
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skip the socks5 proxy for the "depend" phase. It should not be needed
because we only allow bash builtin commands during this phase.
Since the socks5 proxy requires portage's event loop to be explictly
closed before exit, skipping it will allow programs like eclean-dist
to avoid the need to explicitly close portage's event loop before exit.
Bug: https://bugs.gentoo.org/937384
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/937485
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix _EbuildFetcherProcess to handle SIGTERM, so that FETCHCOMMAND
processes will not be left running in the background:
* Convert the fetch function to an async_fetch coroutine function
so that it can use asyncio.CancelledError handlers to terminate
running processes.
* Use multiprocessing.active_children() to detect and terminate
any processes that asyncio.CancelledError handlers did not have
an opportunity to terminate because the exception arrived too
soon after fork/spawn.
* Add unit test to verify that a child process is correctly
killed when EbuildFetcher is cancelled, with short timeout in
case it takes some time for the process to disappear.
Bug: https://bugs.gentoo.org/936273
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conservatively modernize the default width value from 80 to
100. Usually, I do not care much about the width, but the job status
display holds more information these days, compared to the times where
this value was set.
Plus, self._isatty has the tendency to return false, even though
portage is actually run within a tty. The prime examples causing this
are systemd-run (and run0). Therefore, a conservatively increasing the
value is sensible.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1348
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Since FEATURES=merge-wait is now the default, the length of the
merge-wait queue becomes more relevant. Hence show it as part of
portage's job status display.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1347
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The repo_has_webrsync_verify variable was always being set as the empty
string, despite later being compared to 1 in the arithmetic context.
Have it work in the way that was originally intended. This also
eliminates a superfluous use of the has() function, which was the reason
for my inspecting the code in the first place.
Also, apply the exact same fix to emerge-delta-webrsync.
Fixes: b5cd549e07f3d835cbe04e5b718cdd47d7ee69f5
Fixes: 0347637fe5033d3d8eb4fdafa1e86de171934819
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
To write [[ ${-/x/} != $- ]] is horribly backwards and comparatively
expensive. Implement the test - and its inverse - in a sensible fashion.
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just like btrfs the bcachefs filesystem makes heaviy use of xattrs.
In my case
emerge --config gentoo-kernel
failed with
install-xattr: setxattr() failed: Operation not supported
A strace revealed
setxattr("/boot/efi/8410476acd4b1e12c678fc815c18f551/6.9.5-gentoo-dist/linux",
"bcachefs_effective.background_co"..., "zstd", 4, 0) = -1 EOPNOTSUPP (Operation not supported)
and indeed, the source file to the install operation was under
/usr/src which had background compression enabled. As a result,
install-xattr tried to copy the attribute over to the destination file
and failed.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1346
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
that do not contain any {}.
detected with ruff
Signed-off-by: Markus Meier <maekke@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1355
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We sometimes get weird results. For example, in binutils/gdb, we get:
```
* QA Notice: Automake "maintainer mode" detected:
*
* checking for aclocal... ${SHELL} /var/tmp/portage/dev-debug/gdb-15.1/work/gdb-15.1/missing aclocal-1.15
* checking for autoconf... ${SHELL} /var/tmp/portage/dev-debug/gdb-15.1/work/gdb-15.1/missing autoconf
* checking for autoheader... ${SHELL} /var/tmp/portage/dev-debug/gdb-15.1/work/gdb-15.1/missing autoheader
* checking for aclocal... ${SHELL} /var/tmp/portage/dev-debug/gdb-15.1/work/gdb-15.1/missing aclocal-1.15
* checking for autoconf... ${SHELL} /var/tmp/portage/dev-debug/gdb-15.1/work/gdb-15.1/missing autoconf
* checking for autoheader... ${SHELL} /var/tmp/portage/dev-debug/gdb-15.1/work/gdb-15.1/missing autoheader
```
The current pattern looks for the definition of the "missing" script
followed by known autotools commands. With a bit more effort, we can
hopefully match the actual `make` commands that get produced as
maintainer targets. As far as I can tell, they always include an
attempt to cd to the project root and then run the maintainer target.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1359
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Download packages to a custom location if it is configured
in binrepos.conf, instead of PKGDIR. If a custom download
location is not configured then inject downloaded packages
into PKGDIR as usual.
The binarytree download_required method should now be used
instead of the isremote method to check if download is
required, since a remote package may or may not be cached
in the custom location. The get_local_repo_location method
should be used to check if there is a custom download
location, and if there is then downloaded packages must
not be injected into PKGDIR.
If any packages from a repo with a custom download location
were injected into PKGDIR in the past, their identity will
be recognized and will not be re-downloaded to the custom
location.
Bug: https://bugs.gentoo.org/934784
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the `[name]` in repos.conf can only match the primary name.
This is inconvenient if a repository wants to change its name without
breaking existing configurations.
This raises the question of whether to then use the primary name or the
alias in the UI and in the vardb. I went with the primary name because
this is presumably the name that the repository actually wants you to
use.
If the configured name matches neither the primary name nor an alias,
then emaint sync will simply claim that it is not found, but that
behaviour is unchanged from before.
Bug: https://bugs.gentoo.org/935830
Closes: https://github.com/gentoo/portage/pull/1358
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 3.13 python extensions need to declare support for GIL features, for
example if they don't declare Py_MOD_GIL_NOT_USED then it will cause the
GIL to be enabled even when python was launched in free-threaded mode.
This requires "multi-phase initialization" because Py_mod_create is
incompatible with m_slots. There's a PyUnstable_Module_SetGIL() function
that can be used with single-phase init, but it's an unstable API, so
it's better to use multi-phase init. There's no need to use
PyModule_GetState() because the whirlpool module has no mutable state.
Bug: https://bugs.gentoo.org/934220
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|