aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* async_fetch_map: handle _parse_uri_map exception (bug 710130)Zac Medico2020-02-201-3/+6
| | | | | | | | If _parse_uri_map raises an exception then raise it to the caller via the returned future. Bug: https://bugs.gentoo.org/710130 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* AsyncScheduler: use async_start methodZac Medico2020-02-204-15/+53
| | | | | | | | | | | | | Convert AsyncScheduler 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 fix async_iter_completed to be compatible with callback scheduling differences introduced by migration to the async_start method. Bug: https://bugs.gentoo.org/709746 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* AsynchronousTask: Call _start_hook after _start_asyncZac Medico2020-02-171-2/+2
| | | | | | | | | 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>
* EbuildPhase: add _async_start coroutineZac Medico2020-02-172-14/+27
| | | | | | | | | | | | 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>
* AbstractEbuildProcess: add _async_start coroutineZac Medico2020-02-172-27/+14
| | | | | | | | | 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>
* AsynchronousTask: add coroutine async_start methodZac Medico2020-02-1715-48/+87
| | | | | | | | | | | 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>
* fetch: remove secpass import (bug 601252)Zac Medico2020-02-151-3/+3
| | | | | | | | | | Refer to the portage.secpass.data attribute directly rather than via import value, since the value will change after fork and os.setuid calls when the fetch function is called with dropped privileges as discussed in bug 601252. Bug: https://bugs.gentoo.org/601252 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* fetch: split out _ensure_distdir function (bug 601252)Zac Medico2020-02-151-47/+55
| | | | | | | | | Split out an _ensure_distdir function which will have to be called earlier if the fetch function is called with dropped privileges as discussed in bug 601252. Bug: https://bugs.gentoo.org/601252 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* RELEASE-NOTES: fix portage-2.3.89 typoZac Medico2020-02-151-1/+1
| | | | | Reported-by: josef.95 <josef.95@freenet.de> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.89 releaseportage-2.3.89Zac Medico2020-02-142-1/+7
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* _expand_set_args: un-reverse nested set traversalZac Medico2020-02-142-6/+4
| | | | | | | Un-reverse traversal order for @profile @selected @system. Bug: https://bugs.gentoo.org/649622 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* depclean: ensure consistency with update actions (bug 649622)Zac Medico2020-02-144-47/+96
| | | | | | | | | | | | | | 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>
* depgraph: sort nested package set names for consistent resultsZac Medico2020-02-111-2/+4
| | | | | | | | | 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>
* depgraph: sort package set atoms for consistent resultsZac Medico2020-02-091-3/+3
| | | | | | | | 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>
* ResolverPlayground: set PORTAGE_DEBUG=1 for debug modeZac Medico2020-02-091-0/+3
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* test_virtual_w3m: add realistic case, deps copied from real ebuildsZac Medico2020-02-091-0/+142
| | | | | | | | Since virtual/w3m-0 is not removed in the depclean case, this test fails to reproduce bug 649622. Bug: https://bugs.gentoo.org/649622 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* test_virtual_w3m: test without www-client/w3m installedZac Medico2020-02-091-5/+34
| | | | | | | | Add test case showing that virtual/w3m-0 is not pulled in when www-client/w3m is not installed and not in @world. Bug: https://bugs.gentoo.org/649622 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* test_virtual_w3m: test with www-client/w3m in @worldZac Medico2020-02-091-0/+29
| | | | | | | | | | | Test for behavior reported in bug 649622 comment #10, where depclean removed virtual/w3m-0 even though www-client/w3m was in the world file. Since nothing is removed here, it means that we have not reproduced the behavior reported in this comment. Bug: https://bugs.gentoo.org/649622#c19 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.88 releaseportage-2.3.88Zac Medico2020-02-083-1/+19
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Support FEATURES=qa-unresolved-soname-deps (bug 708448)Zac Medico2020-02-084-6/+15
| | | | | | | | | | | | 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>
* preserve-libs: generate implicit rpath for bundled libs (bug 705736)Zac Medico2020-02-081-9/+54
| | | | | | | | | | | | | | | In order to account for internal library resolution which a package may implement (useful at least for handling of bundled libraries), generate implicit runpath entries for any needed sonames which are provided by the same owner package. For packages that have bundled versions of system libraries, this will prevent preserve-libs from unecessarily preserving system libraries as reported in bug 705736. For the www-client/firefox-bin-72.0.2 package, this adds an implicit /opt/firefox runpath entry to 15 files. Bug: https://bugs.gentoo.org/705736 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* dep_zapdeps: prefer choices with all in graph (bug 649622)Zac Medico2020-02-082-8/+9
| | | | | | | | | | | | Prefer choices where all packages have been pulled into the graph (except for choices that eliminate upgrades). This logic must be consistent between both update and removal (depclean) actions in order to avoid pulling in packages only to have them removed by depclean, as reported in bug 649622 for virtual/w3m. Bug: https://bugs.gentoo.org/649622 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* phase-helpers.sh: avoid passing an empty root value to portageqMike Gilbert2020-02-081-3/+3
| | | | | | Bug: https://bugs.gentoo.org/708660 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Add unit test for virtual/w3m depclean inconsistency (bug 649622)Zac Medico2020-02-081-1/+113
| | | | | Bug: https://bugs.gentoo.org/649622 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* xpak: break_hardlinks: use native copyfile for cowZac Medico2020-02-031-2/+3
| | | | | | Enable zero-copy, sparse copy, and reflinks. Signed-off-by: Zac Medico <zmedico@gentoo.org>
* create_world_atom: fix spelling of multiple in commentsZac Medico2020-02-031-2/+2
| | | | | Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* create_world_atom: fix outdated comments regarding greedy atomsZac Medico2020-02-031-5/+6
| | | | | | 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>
* doc: replace epydoc with sphinx-apidoc + sphinx-epytextZac Medico2020-02-035-19/+131
| | | | | Bug: https://bugs.gentoo.org/707820 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Drop compat code for ancient python versionsManuel Rüger2020-02-039-93/+7
| | | | | | Closes: https://github.com/gentoo/portage/pull/503 Signed-off-by: Manuel Rüger <manuel@rueg.eu> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* sphinx-build: avoid autodoc ModuleNotFoundError for xattrZac Medico2020-02-021-3/+2
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* sphinx-build: remove broken lazyimport for _spawn_phaseZac Medico2020-02-021-1/+1
| | | | | Fixes: d318bcce356b ("vartree: add missing _merge_unicode_error import") Signed-off-by: Zac Medico <zmedico@gentoo.org>
* sphinx-build: avoid autodoc ModuleNotFoundError for selinuxZac Medico2020-02-021-3/+6
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.87 releaseportage-2.3.87Zac Medico2020-02-012-1/+8
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* cpv_expand: treat GLEP 81 acct-* categories like virtual (bug 691798)Zac Medico2020-02-012-3/+3
| | | | | | | | | | 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>
* depclean: do not eliminate upgrades (bug 707108)Zac Medico2020-02-012-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | For depclean actions, prefer choices where all packages have been pulled into the graph, except for choices that eliminate upgrades. This solves the test case for bug 707108, where depclean eliminated a new slot of python that had been pulled in by a world update. This should also prevent non-deterministic elimination of the latest vala slot that was reported in bug 693790. NOTE: There's a common perception (expressed in bug 705700) that emerge is pulling in an "unecessary" python slot in cases when that python slot is not enabled in PYTHON_TARGETS. However, the so-called "unnecessary" slot is practically indistinguishable from a desirable upgrade such as the missed llvm slot upgrade that was reported in bug 706278. Therefore, be advised that emerge must pull in the highest visible slot (regardless of PYTHON_TARGETS) in order to ensure that a desirable upgrade is not missed. Fixes: f7d83d75c6b0 ("dep_zapdeps: adjust || preference for slot upgrades (bug 706278)") Bug: https://bugs.gentoo.org/707108 Bug: https://bugs.gentoo.org/706278 Bug: https://bugs.gentoo.org/705700 Bug: https://bugs.gentoo.org/693790 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Add test case that demonstrates bug 707108Zac Medico2020-01-311-0/+123
| | | | | Bug: https://bugs.gentoo.org/707108 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Include the category when we suggest running "emerge ... portage"Mike Gilbert2020-01-313-4/+4
| | | | | | | | This will prevent problems if another package named "portage" is added in another category. Signed-off-by: Mike Gilbert <floppym@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.86 releaseportage-2.3.86Zac Medico2020-01-272-2/+9
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Suppress /etc/portage/package.keywords warning for API consumersZac Medico2020-01-271-2/+3
| | | | | | Suggested-by: Jeroen Roovers <jer@gentoo.org> Bug: https://bugs.gentoo.org/706298 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* dep_zapdeps: adjust || preference for slot upgrades (bug 706278)Zac Medico2020-01-264-40/+67
| | | | | | | | | | | | | | | | | | | | | 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>
* OrChoicesTestCase: split out bug 480736 libpostproc test caseZac Medico2020-01-251-56/+59
| | | | | | | | | This case will become an expected failure after bug 706278 is fixed. The packages that triggered bug 480736 not longer exist. Bug: https://bugs.gentoo.org/480736 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* MultirepoTestCase: package.keywords -> package.accept_keywordsZac Medico2020-01-251-4/+4
| | | | | Bug: https://bugs.gentoo.org/607852 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* OrUpgradeInstalledTestCase: add test for bug 706278Zac Medico2020-01-251-0/+71
| | | | | Bug: https://bugs.gentoo.org/706278 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* SonameAtom: implement get/set state methods (bug 706186)Zac Medico2020-01-232-9/+10
| | | | | | | | Since SonameAtom instances are immutable, the __getstate__ and __setstate__ methods need to be implemented for pickle support. Bug: https://bugs.gentoo.org/706186 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* TestSonameAtomPickle: new test for bug 706186Zac Medico2020-01-231-0/+28
| | | | | Bug: https://bugs.gentoo.org/706186 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.85 releaseportage-2.3.85Zac Medico2020-01-222-1/+10
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Add QA check for unresolved soname dependencies (bug 704320)Zac Medico2020-01-224-15/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* doebuild: export SANDBOX_LOG=${T}/sandbox.log (bug 704848)Zac Medico2020-01-222-3/+3
| | | | | | | | | | | In order to avoid a SANDBOX_LOG collision with another process having the same pid when pid-sandbox is enabled, export a unique SANDBOX_LOG value. The ${T} directory is a convenient location, since it is guaranteed to exist and be writable during relevant ebuild phases. Bug: https://bugs.gentoo.org/704848 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* UserWarning if /etc/portage/package.keywords existsZac Medico2020-01-221-2/+11
| | | | | | | | | | | | | | | The /etc/portage/package.keywords file has been long deprecated in favor of /etc/portage/package.accept_keywords. The file would be useful if we could make it behave like package.keywords in profiles (see bug 491166), but it's safest if we trigger a UserWarning for some time before we change the meaning in a future version of portage. The message looks like this: UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead Bug: https://bugs.gentoo.org/491166 Bug: https://bugs.gentoo.org/607852 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* dosym: revert deprecated prefix compat (bug 615594)Zac Medico2020-01-221-11/+2
| | | | | | | | According to PMS, dosym callers need to explicitly prefix the first argument with ${EPREFIX} if that's desired. https://bugs.gentoo.org/615594 Signed-off-by: Zac Medico <zmedico@gentoo.org>