| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/851750
Closes: https://github.com/gentoo/portage/pull/840
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: David Palao <david.palao@gmail.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
| |
RepoMan sez: So long and thanks for all the fish! I'll be enjoying my
retirement now. Haven't I done enough to deserve that?
Bug: https://bugs.gentoo.org/835013
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
|
| |
This avoids clobbering the main sandbox.log file when
"misc-functions.sh die_hooks" is invoked after an ebuild phase.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Result from running this:
find -name '*.py' |xargs sed -i -e 's/!= None/is not None/g'
Same as the previous commit, just figured I'd keep the results in
separate commits.
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Closes: https://github.com/gentoo/portage/pull/812
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/792195
Signed-off-by: Sam James <sam@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/795
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
These were part of the 4-python and 5-progress EAPIs and were a branch
of the code deep enough to warrant its removal in its own patch.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
| |
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
| |
Signed-off-by: Kenneth Raplee <kenrap@kennethraplee.com>
Closes: https://github.com/gentoo/portage/pull/796
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Kenneth Raplee <kenrap@kennethraplee.com>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These files are updated to use the newer f-string feature (String
Interpolation) that has been added since Python 3.6.
The benefits to using String Interpolation are:
* Avoids incurring bugs from using Old Style formatting.
* Makes it easier to understand how the string is being formatted.
* Using embedded expressions into strings removes the need for string
concatenation and will execute much faster for the same effect.
Also, a few global string constants with Old Style formatting had their
literals inlined to their respective function arguments while
transitioning them be f-strings. When Python searches for variables, it
looks them up in the local namespace first, which is the namespace
specific a function or class method. If not found, then it searches in
the global namespace. Removing the need for global strings will also
improve performance a bit along the way.
The Portage codebase as a whole still needs this kind of work.
Signed-off-by: Kenneth Raplee <kenrap@kennethraplee.com>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Fix typos in comments and class/function descriptions in the
lib/_emerge/resolver scripts
Signed-off-by: Philipp Rösner <rndxelement@protonmail.com>
Closes: https://github.com/gentoo/portage/pull/797
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The --keep-going 'dropped' message sometimes contains duplicate atoms:
* emerge --keep-going: app-containers/podman-4.0.2 dropped because it
* requires app-containers/catatonit, app-containers/catatonit
This patch deduplicates the atoms printed in that message:
* emerge --keep-going: app-containers/podman-4.0.2 dropped because it
* requires app-containers/catatonit
Closes: https://github.com/gentoo/portage/pull/792
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Portage itself does not need /run to be mounted.
build-docbook-catalog was adjusted to create locks in /etc/xml instead.
Bug: https://bugs.gentoo.org/832853
Reverts: 0e9e12aadb889766d61c0561b9723e71542d43e6
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/788
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/500630
Bug: https://bugs.gentoo.org/659864
Bug: https://bugs.gentoo.org/672672
Bug: https://bugs.gentoo.org/773259
Bug: https://bugs.gentoo.org/820578
Signed-off-by: Rin Cat (鈴猫) <dev@rincat.ch>
Closes: https://github.com/gentoo/portage/pull/562
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/portage/pull/780
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This change seems to cause problems with emerge --depclean.
Reverts: 6091fcd861034b9b20677098827eff7b7a148853
Bug: https://bugs.gentoo.org/687956
Bug: https://bugs.gentoo.org/829623
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dealing with ambiguous package names on command-line, do not use
installed packages to resolve them. This is counterintuitive
in the best case, and probably the wrong answer most of the time.
After all, if a user calls emerge with a specific package name, it is
quite likely that he intends to install a missing package rather than
rebuild or upgrade an individual package (though the latter can also
happen). Rather than making assumptions that can go wrong, just display
the ambiguity message as usual.
Bug: https://bugs.gentoo.org/828059
Closes: https://github.com/gentoo/portage/pull/775
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Default emerge --ignore-soname-deps=n, in order to enable
soname dependencies by default. As always, soname dependencies
remain inapplicable in the absence of the --usepkgonly option
(or --getbinpkgonly). Therefore, this change only affects
commands that specify --usepkgonly or --getbinpkgonly.
Bug: https://bugs.gentoo.org/687956
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new option "--usepkg-exclude-live" for emerge.
Passing this option with the emerge call, will disable binary pkgs from
being installed for live ebuilds. So it is no longer necessary to pass
a list of live packages to --usepkg-exclude.
Before this commit, when an emerge is called with the option
'--usepkg', the corresponding package is installed from the binary cache
under /var/cache/binpkgs.
With this commit, even if we explicitly use the options, '--usepkg'
for the packages with live ebuilds, no binary package will not be
installed for live ebuilds (given we disable it calling emerge with
"--usepkg-exclude-live" in the emerge).
Motivation: We no longer need to maintain a separate list for VCS based
pkgs (eg., git pkgs), from being installed from the binary cache, and
then pass it to --usepkg-exclude. This reduces some redundancy.
Closes: https://github.com/gentoo/portage/pull/769
Signed-off-by: Madhu Priya Murugan <madhu.murugan@rohde-schwarz.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new value "buildpkg-live" for FEATURES, which
is enabled by default (so the default behavior of building binary cache
for all packages is retained). When it is disabled by calling emerge
with FEATURES="-buildpkg-live", binary caches will not be built live
ebuilds even if we specify --buildpkg. So that it is no longer necessary
to pass a list of packages with live ebuilds to --buildpkg-exclude.
Before this commit, when an emerge is called with the option
'--buildpkg', a binary cache for the package is created under
/var/cache/binpkgs. For example, when we do a, 'emerge --ask
--verbose --buildpkg some-gitpkg/abc', a binary cache abc-1.1.1.tbz2
is created under /var/cache/binpkgs/some-gitpkg.
With this commit, even if we explicitly use the options, '--buildpkg'
for the packages with live ebuilds, no binary cache will be created
(given we disable it calling emerge with FEATURES="-buildpkg-live").
Motivation: Since binary caches are created for all packages, including
packages with live ebuilds, a separate list of (for eg.,) git packages
needs to be maintained. And this is then passed to the options
'--buildpkg-exclude' via, EMERGE_DEFAULT_OPTS. So the motivation behind
this patch was to reduce redundancy, while we can simply disable binary
cache for live ebuilds with this option.
Closes: https://github.com/gentoo/portage/pull/766
Signed-off-by: Madhu Priya Murugan <madhu.murugan@rohde-schwarz.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Move ipc files to a .ipc subdirectory, with a setgid bit to
prevent a lockfile group permission race. The lockfile function
uses an appropriate open call with mode argument so that the
lockfile is created atomically with both group ownership and
group write bit.
Bug: https://bugs.gentoo.org/468990
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a series of fixes for the linked bug (failure
to preserve libraries in some situations).
When unpacking a binpkg to be installed, we should check
for the existence of PROVIDES if we're installing any
dynamic libraries. If PROVIDES does not exist in that case,
this suggests that e.g. scanelf malfunctioned or some corruption occurred.
Bug: https://bugs.gentoo.org/811462
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer versions of build-docbook-catalog use
/run/lock. This exposed that we weren't
asking users to mount /run in the handbook.
Check if it exists and warn if it doesn't.
This should primarily (exclusively?) be a
problem in chroots given an init system
should be creating this.
Bug: https://bugs.gentoo.org/816303
Closes: https://github.com/gentoo/portage/pull/762
Reviewed-by: Alec Warner <antarus@gentoo.org>
Reviewed-by: Mike Gilbert <floppym@gentoo.org>
Thanks-to: Duncan
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This makes things a bit less confusing and tries to avoid
users focusing on (soft) blocks which aren't actually
the problem they're hitting.
Signed-off-by: Sam James <sam@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/760
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```
[blocks b ] >perl-core/Scalar-List-Utils-1.550.0-r999 (">perl-core/Scalar-List-Utils-1.550.0-r999" is blocking virtual/perl-Scalar-List-Utils-1.550.0)
```
After:
```
[blocks b ] >perl-core/Scalar-List-Utils-1.550.0-r999 (">perl-core/Scalar-List-Utils-1.550.0-r999" is soft blocking virtual/perl-Scalar-List-Utils-1.550.0)
```
This should make it a little bit clearer when a block matters,
especially given we already explicitly say 'hard blocking'
for the opposite case.
Signed-off-by: Sam James <sam@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>
|
|
|
|
|
|
|
|
|
|
|
| |
The following command was used to reformat:
autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r .
black was run as `black .`, using the default configurations
Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The UNUSED* auxdbkeys are a relict of old metadata cache format that
required a fixed number of lines. This format is no longer supported
by Portage, and all uses of auxdbkeys strip UNUSED values, so just
remove them entirely.
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/742
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sort USE flags in output by a combined sort that treats sequences
of digits as numbers and sorts them numerically rather than lexically.
As a result, python3_10 now sorts after python3_9.
Ideally, we'd just respect the order from profiles/desc but this should
work as an intermediate solution until we figure out how to implement
that.
Bug: https://bugs.gentoo.org/show_bug.cgi?id=788346
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 055abe523c2c3f6c8f1dccfb53565209222f90c1
due to another regression.
See: https://github.com/gentoo/portage/pull/728
Bug: https://bugs.gentoo.org/777492
Bug: https://bugs.gentoo.org/785484
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With Linux's autogroup scheduling feature (CONFIG_SCHED_AUTOGROUP)
setting a nice value on a per-process base has only an effect for
scheduling decisions relative to the other threads in the same
session (typically: the same terminal window). See the section "The
nice value and group scheduling" in the sched(7) man page.
Basically this means that portage "just" setting the nice value, has
no effect in presence of autogroup scheduling being active (which is
probably true for most (desktop) user systems).
This commit changes emerge to set the autogroup's nice value, instead
of the processes' nice value, in case autogroups are present (detected
by the existence of /proc/self/autogroup). The tricky part about
autogroup nice values is that we want restore the orignal nice value
once we are finished. As otherwise, the session, e.g. your terminal,
would continue using this value, and so would subsequently executed
processes. For that we use Python's atexit functinaly, to register a
function that will restore the orignal nice value of the autogroup.
Users may have set PORTAGE_NICENESS to a value outside of the range
of valid nice values [-20, 19]. Calling os.nice() with such a value
will simply cap the process's nice value, but writing this invalid
value to the autogoup pseudo-file will fail with "Invalid argument".
Since os.nice() returns the current nice value, we simply use the
returned value to set the autogroup nice value.
Portage would previously always change the nice value to zero, even if
the user did not explicitly request so. Now we do not change the nice
value unless requested.
Closes: https://github.com/gentoo/portage/pull/727
Bug: https://bugs.gentoo.org/777492
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit a4d882964ee1931462f911d0c46a80e27e59fa48.
It triggered this regression:
# PORTAGE_NICENESS=20 emerge -av --depclean
OSError: [Errno 22] Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.9/emerge", line 51, in <module>
retval = emerge_main()
File "/usr/lib/python3.9/site-packages/_emerge/main.py", line 1319, in emerge_main
return run_action(emerge_config)
File "/usr/lib/python3.9/site-packages/_emerge/actions.py", line 2999, in run_action
apply_priorities(emerge_config.target_config.settings)
File "/usr/lib/python3.9/site-packages/_emerge/actions.py", line 2635, in apply_priorities
nice(settings)
File "/usr/lib/python3.9/site-packages/_emerge/actions.py", line 2672, in nice
out.eerror("%s\n" % str(e))
OSError: [Errno 22] Invalid argument
Bug: https://bugs.gentoo.org/777492#c4
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
# emerge -V
Portage 3.0.20 (python 3.8.5-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.31-r6, 5.4.x x86_64)
/usr/lib/python3.8/site-packages/_emerge/actions.py:2663: ResourceWarning: unclosed file <_io.TextIOWrapper name='/proc/self/autogroup' mode='w' encoding='UTF-8'>
lambda value: autogroup_file.open("w").write(value).close(),
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Fixes: a4d882964ee1 ("PORTAGE_NICENESS: Consider autogroup scheduling")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With Linux's autogroup scheduling feature (CONFIG_SCHED_AUTOGROUP)
setting a nice value on a per-process base has only an effect for
scheduling decisions relative to the other threads in the same
session (typically: the same terminal window). See the section "The
nice value and group scheduling" in the sched(7) man page.
Basically this means that portage "just" setting the nice value, has
no effect in presence of autogroup scheduling being active (which is
probably true for most (desktop) user systems).
This commit changes emerge to set the autogroup's nice value, instead
of the processes' nice value, in case autogroups are present (detected
by the existence of /proc/self/autogroup). The tricky part about
autogroup nice values is that we want restore the orignal nice value
once we are finished. As otherwise, the session, e.g. your terminal,
would continue using this value, and so would subsequently executed
processes. For that we use Python's atexit functinaly, to register a
function that will restore the orignal nice value of the autogroup.
Bug: https://bugs.gentoo.org/777492
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Create and use an explicit ${PORTAGE_BUILDDIR}/empty as working
directory for pkg_* phases, as proposed for EAPI 8.
Note that this patch doesn't work fully -- empty is not cleared between
pkg_preinst and pkg_postinst, and between pkg_prerm and pkg_postrm.
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This commit removes the variable localtree, which is assigned once
to point to vartree and then never modified.
Closes: https://github.com/gentoo/portage/pull/705
Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
This commit reuses the already existing helper variable quiet
to avoid rechecking if --quiet is contained in myopts.
Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the order in which packages are uninstalled
with --unmerge to be deterministic.
Before this commit, when an atom specified with --unmerge matches
multiple versions, these versions were uninstalled in a random order.
For example, when some-pkg-1.0.0 and some-pkg-2.0.0 are installed,
then running emerge --unmerge some-pkg will unmerge 1.0.0 and 2.0.0
in a random order.
With this commit, when an atom matches multiple versions,
they are uninstalled in a sorted order. So in the above example,
1.0.0 will be unmerged before 2.0.0.
This does not affect the order specified on the command-line,
for example when running:
emerge --unmerge =some-pkg-2.0.0 =some-pkg-1.0.0
that order is respected, as before this commit.
Similarly, when uninstalling multiple different packages, e.g.:
emerge --unmerge some-pkg some-other-pkg
the sorting only applies to the versions matching each atom,
so the versions matching some-pkg are sorted separately from
the versions matching some-other-pkg, and since some-pkg
is specified before some-other-pkg, its versions will be
uninstalled first.
Motivation: When a package has a custom pkg_postrm hook, uninstalling
multiple versions in a random order can leave the filesystem in a
different state depending on which version is uninstalled last.
When running emerge as part of a larger build system such as catalyst,
this is an obstacle towards reproducible builds.
Bug: https://bugs.gentoo.org/782724
Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Closes: https://github.com/gentoo/portage/pull/720
Bug: https://bugs.gentoo.org/520378
Signed-off-by: James Stevenson <james.al.stevenson@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Closes: https://github.com/gentoo/portage/pull/707
Bug: https://bugs.gentoo.org/285614
Signed-off-by: James Stevenson <james.al.stevenson@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/788967
Closes: https://github.com/gentoo/portage/pull/706
Reported-by: Christophe Lermytte <gentoo@lermytte.be>
Signed-off-by: Marco Sirabella <marco@sirabella.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/787545
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The included unit test case previously failed with this error:
emerge: error: unrecognized arguments: dev-libs/A
Bug: https://bugs.gentoo.org/784566
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|