| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since configdict["pkg"]["USE"] may contain package.use settings
from config.setcpv, it is inappropriate to use here (bug 675748),
so discard it. This is only an issue because configdict["pkg"] is
a sub-optimal place to extract metadata from. This issue does not
necessarily indicate a flaw in the Package constructor, since
passing in precalculated USE can be valid for things like
autounmask USE changes.
Bug: https://bugs.gentoo.org/675748
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/919751
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the ResolverPlayground _create_ebuild_manifests method
call egencache --jobs, which reliably triggers the KeyError
from bug 924319 for multiple tests:
lib/portage/tests/bin/test_doins.py::DoIns::testDoInsFallback Exception in callback EbuildMetadataPhase._async_start_done(<Task finishe...Error('EAPI')>)
handle: <Handle EbuildMetadataPhase._async_start_done(<Task finishe...Error('EAPI')>)>
Traceback (most recent call last):
File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "lib/_emerge/EbuildMetadataPhase.py", line 154, in _async_start_done
future.cancelled() or future.result()
^^^^^^^^^^^^^^^
File "lib/_emerge/EbuildMetadataPhase.py", line 130, in _async_start
retval = portage.doebuild(
^^^^^^^^^^^^^^^^^
File "lib/portage/package/ebuild/doebuild.py", line 1030, in doebuild
doebuild_environment(
File "lib/portage/package/ebuild/doebuild.py", line 519, in doebuild_environment
eapi = mysettings.configdict["pkg"]["EAPI"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "lib/portage/util/__init__.py", line 1684, in __getitem__
return UserDict.__getitem__(self, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "lib/portage/cache/mappings.py", line 175, in __getitem__
return self.data[key]
~~~~~~~~~^^^^^
KeyError: 'EAPI'
Bug: https://bugs.gentoo.org/924319
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a dep_check action which can be used to check the
dependencies of all installed packages. The plan is for depgraph
to use this action to check for broken dependencies prior to the
merge order calculation. The new frozen_config parameter will
allow depgraph to pass a shared frozen config to _calc_depclean.
The result of the dep_check action becomes stale as soon as there
is any change to the installed packages. So, in order to account
for dependencies that may become broken or satisfied during the
process of updating installed packages, the merge order
calculation will need to refresh the dep_check calculation for
every merge order choice that it makes. This refresh will need
to be optimized to identify the portion of the graph that would
become stale due to a given change, so that it can avoid
unnecessary repetition of work.
Bug: https://bugs.gentoo.org/921333
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This ensures that CrossDepPriorityTestCase uses the correct
python implementation when it calls emerge, by overriding
behavior of #!/usr/bin/env python shebangs.
Fixes: 1d856747ada4 ("DepPriority{Normal,Satisfied}Range: weaken _ignore_runtime for cross root")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stop implicitly forcing `NO_COLOR` and `NOCOLOR` in ebuild environment.
This is undesired for several reasons:
1. It makes it impossible to control color for emerge output
independently of command output, e.g. when one goes to a pty while
the other goes to logs.
2. It makes it impossible to get color output in logs when running
`emerge --jobs ...`.
3. Forcing `NO_COLOR=1` turns out to cause random test failures,
and while fixing them is commendable, it is a pain for arch testing
and it is currently blocking stabilization requests.
With the new approach, the color output in programs is consistent
between using ``--jobs`` or ``--quiet-build``, and not. Therefore,
both cases generate uniform logs. In order to obtain logs free of color
codes, one can either filter them via `ansifilter(1)` (as the manpages
already recommend) or explicitly set `NO_COLOR`.
Furthermore, one can combine color-free build output (for clean logs)
with colorful emerge output by using:
NO_COLOR=true emerge --color y ...
Bug: https://bugs.gentoo.org/918515
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1188
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Thanks to codespell.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a UTF-8 locale, or UTF-8 mode is detected, set
portage.utf8_mode to True, and do not wrap file access
with _unicode_func_wrapper. This is intended to mitgate
issues with byte string handling in python libraries
like shutil, as reported in bug 914722.
This patch is intended to be a simple and minimal
implementation that can be optimized later through
the elimination of unecessary encoding/decoding.
The str() wrapping in the unit tests is for lazily
evaluated instances of lazy_value, which is used to
account for mock portage.const.EPREFIX values that
exist during unit tests.
Bug: https://bugs.gentoo.org/914722
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Tests expect the index to be generated anyway, so let's not rely on
implicit FEATURES=-pkgdir-index-trusted.
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/898224
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: https://github.com/gentoo/portage/pull/1003
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
After running flynt, it finds a few more bits.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Fixes failing tests after previous change to _doebuild_path.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/861077
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
XPAK format does not support signature and should be avoided when
mandatory signature is expected.
Signed-off-by: Sheng Yu <syu.os@protonmail.com>
Closes: https://github.com/gentoo/portage/pull/785
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Lazily evaluate cnf_* variables, allowing for mock portage.const
settings created by ResolverPlayground. In ResolverPlayground,
create symlinks for PORTAGE_BIN_PATH scripts inside the mock
EPREFIX, and restore portage.const.EPREFIX in the cleanup method.
Bug: https://bugs.gentoo.org/783957
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
* Drop unused-import
* Slight refactor on imports
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a cleanup to enable pylint. This is only stdlib modules;
there are hundreds of unused imports of other modules but its less clear
how safe those are to remove due to side effects.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: If9bee83bbbe1620b34a0f8d153637909af2b8512
Closes: https://github.com/gentoo/portage/pull/585
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
In python3 inheriting from object is no longer required.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: Id489d4103d975a751be148205694cb6a20d33b31
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Replace basestring and _unicode hacks with str, and long with int.
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/570
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Use sort and comm with temporary files in order to compare lists
of docompress -x and precompressed files, since the file lists
can be extremely large. Also strip ${D%/} from paths in order to
reduce length.
Bug: https://bugs.gentoo.org/721516
Suggested-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a _compat_upgrade.binpkg_compression script that the
ebuild can call in pkg_preinst in order to maintain a backward-compatible
bzip2 default when appropriate, ensuring that binary package consumers
are not caught off guard.
Bug: https://bugs.gentoo.org/715108
Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Also add mkfifo to ResolverPlayground essential_binaries, since it's
required by __multijob_init.
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Update all relevant references in docs, messages, and comments
to refer to /var/db/repos/gentoo instead of /usr/portage. Also
update DISTDIR and PKGDIR references to refer to the new
/var/cache/{distfiles,binpkgs} locations.
Bug: https://bugs.gentoo.org/378603
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
The canonicalize function is required by install-qa-check.d/05prefix.
Fixes: aa0a94198794 ("ecompress: Replace with implementation from portage[mgorny]")
Bug: https://bugs.gentoo.org/670484
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Ensure that essential_binaries symlinks do not refer to internal
wrapper scripts, in order to avoid infinite recursion. Use the
same ebuild-helpers pattern as the portageq wrapper script since
daeb75b345c4433218ab9e7a5319e8914092f048.
Fixes: 1b5edbb5ec70 ("_doebuild_path: do not use host PATH by default and prepend EPREFIX PATH")
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
EPREFIX could be overridden in cross-eprefix, in that case tools
inside EPREFIX should be prioritized.
Link necessary binary tools to the test environment.
Bug: https://bugs.gentoo.org/585986
Closes: https://github.com/gentoo/portage/pull/387
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
Closes: https://github.com/gentoo/portage/pull/343
|