aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* dep_zapdeps: break more buildtime cycles (bug 705986)Zac Medico2020-01-222-13/+6
| | | | | | | | | | | | Buildtime cycle breaking was not enabled in cases where the all_in_graph variable was False, and this prevented the pypy / pypy-exe dependency cycle from being broken as shown in the test case for bug 705986. In order to break more buildtime cycles, enable cycle breaking regardless of the state of the all_in_graph variable. Bug: https://bugs.gentoo.org/705986 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Test /etc/portage/modules portdbapi.auxdbmodule settingsZac Medico2020-01-212-1/+51
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Add unit test which demonstrates bug 705986Zac Medico2020-01-201-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | This USE suggestion appears to prevent application of || preference adjustment to solve the cycle (pypy-exe-bin would solve it): * Error: circular dependencies: (dev-python/pypy-exe-7.3.0:7.3.0/7.3.0::test_repo, ebuild scheduled for merge) depends on (dev-python/pypy-7.3.0:0/73::test_repo, ebuild scheduled for merge) (buildtime) (dev-python/pypy-exe-7.3.0:7.3.0/7.3.0::test_repo, ebuild scheduled for merge) (buildtime) It might be possible to break this cycle by applying the following change: - dev-python/pypy-exe-7.3.0 (Change USE: +low-memory) Meanwhile, an explicit pypy-exe-bin argument adjusts the || preference and breaks the cycle: $ emerge -pq pypy pypy-exe-bin [ebuild N ] dev-python/pypy-exe-bin-7.3.0 [ebuild N ] dev-python/pypy-7.3.0 Bug: https://bugs.gentoo.org/705986 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* travis.yml: drop pypy and python 3.5Zac Medico2020-01-042-6/+4
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* travis.yml: enable pypy3Zac Medico2020-01-041-0/+1
| | | | | Bug: https://bugs.gentoo.org/575840 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge-delta-webrsync: chmod 755 temp dir (bug 704256)Zac Medico2019-12-301-0/+1
| | | | | | | | | Before the rsync call, chmod 755 the temporary directory so that the root directory of the repository will have appropriate permissions. Fixes: fa0f8720e168 ("emerge-delta-webrsync: handle gentoo-YYYYMMDD directory name") Bug: https://bugs.gentoo.org/704256 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge-webrsync: chmod 755 temp dir (bug 704256)Zac Medico2019-12-301-0/+1
| | | | | | | | | Before the rsync call, chmod 755 the temporary directory so that the root directory of the repository will have appropriate permissions. Fixes: 92f4b283c86a ("emerge-webrsync: handle gentoo-YYYYMMDD directory name") Bug: https://bugs.gentoo.org/704256 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.84 releaseportage-2.3.84Zac Medico2019-12-262-1/+9
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* _serialize_tasks: limit scope of dropped circular dependenciesZac Medico2019-12-262-41/+78
| | | | | | | | | | | | | | | | | | | | | | | | | Ensure that all members of a buildtime dependency cycle are merged as a group, such that packages which depend on one or more members of the group will only be merged *after* the entire group has been merged. This extends runtime cycle handling to also handle buildtime cycles in cases where the buildtime dependencies happen to be satisfied by installed packages. In situations when this is necessary, it is desirable to rely on the old installed instances of these packages as little as possible, since they might have been broken by the upgrade of a package that is a member of the dependency cycle. Upgrading members of the cycle as a group effectively minimizes reliance on the old installed package instances, avoiding some cases of bug 199856. For example, it should avoid bug 703676, where libspectre reportedly failed to build against an old installed instance of ghostscript-gpl. Bug: https://bugs.gentoo.org/199856 Bug: https://bugs.gentoo.org/689644 Bug: https://bugs.gentoo.org/690436 Bug: https://bugs.gentoo.org/703676 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge --with-test-deps: use _queue_disjunctive_depsZac Medico2019-12-261-5/+9
| | | | | | | | This delays evaluation of || deps, avoiding possible redundant packages and conflicts. Fixes: 85f0dd173ab7 ("emerge --with-test-deps: allow circular deps") Signed-off-by: Zac Medico <zmedico@gentoo.org>
* eapply: Drop QA warning for fuzz factor.Ulrich Müller2019-12-261-2/+0
| | | | | | | | This didn't add any information beyond what is already present in the output of patch. Developers will know how to interpret its output, and users won't see the warning anyway with the standard configuration. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Clean up remnants of eapi5-hdepend, HDEPEND and targetrootMichał Górny2019-12-2621-138/+53
| | | | | | Reviewed-by: Zac Medico <zmedico@gentoo.org> Closes: https://github.com/gentoo/portage/pull/490 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* MergeOrderTestCase: update circ-buildtime mergelist for bug 690436Zac Medico2019-12-251-2/+7
| | | | | | | | | Update mergelist for the circ-buildtime test case so that it will pass after the fix for bug 690436, and also add a commented merge order assertion which will succeed after the fix. Bug: https://bugs.gentoo.org/690436 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.83 releaseportage-2.3.83Zac Medico2019-12-232-1/+9
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* backtracking: adjust || preference to break dependency cyclesZac Medico2019-12-234-4/+84
| | | | | | | | | | | | | | | | | | | Store dependency cycle edges as backtracking parameters, and use them to adjust || preferences in order to break dependency cycles. This extends direct cycle breaking to handle indirect dependency cycles, which solves the cmake-bootstrap test case for bug 703440. If any cycle(s) remain unsolved by the next backtracking run, then backtracking aborts and the cycle(s) are reported as usual. Note that backtracking is necessary in order to avoid bugs of the form "emerge installs packages only to have them removed by depclean", since this sort of behavior is desirable only when it eliminates a dependency cycle. Bug: https://bugs.gentoo.org/382421 Bug: https://bugs.gentoo.org/384107 Bug: https://bugs.gentoo.org/703440 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* _queue_disjunctive_deps: group disjunctions recursively (bug 701996)Zac Medico2019-12-231-4/+4
| | | | | | | | | | When disjunctive dependencies are queued, recursively group together disjunctions from the same dependency string so that any overlap between them will trigger expansion to DNF. Fixes: fa7b6ea6ecdc ("_queue_disjunctive_deps: group disjunctions (bug 701996)") Bug: https://bugs.gentoo.org/701996 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge --with-test-deps: allow circular depsZac Medico2019-12-234-8/+166
| | | | | | | | | | When USE=test is not enabled, allow circular test dependencies by treating them like PDEPEND. When USE=test is enabled, circular dependencies are still not allowed, as shown in unit tests. Suggested-by: Michał Górny <mgorny@gentoo.org> Bug: https://bugs.gentoo.org/703348 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* testVirtualCmakeBootstrapUseConditional: use RDEPEND for virtual/cmakeZac Medico2019-12-211-1/+1
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* testVirtualCmakeBootstrapUseConditional: split out virtual/cmakeZac Medico2019-12-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | If we split the dependency conditional on the bootstrap USE flag into a virtual, then it suffices to rebuild the virtual with USE=-bootstrap instead of rebuilding jsoncpp: * Error: circular dependencies: (dev-libs/jsoncpp-1.9.2:0/0::test_repo, ebuild scheduled for merge) depends on (virtual/cmake-0:0/0::test_repo, ebuild scheduled for merge) (buildtime) (dev-util/cmake-3.16.2:0/0::test_repo, ebuild scheduled for merge) (buildtime) (dev-libs/jsoncpp-1.9.2:0/0::test_repo, ebuild scheduled for merge) (buildtime_slot_op) It might be possible to break this cycle by applying the following change: - virtual/cmake-0 (Change USE: +bootstrap) Note that this change can be reverted, once the package has been installed. Bug: https://bugs.gentoo.org/703440 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* test_circular_choices: add cases for bug 703440Zac Medico2019-12-211-0/+75
| | | | | | | | | | | | The testCircularJsoncppCmakeBootstrapOrDeps method fails due to circular dependencies triggered when it ignores cmake-bootstrap in order to eliminate redundant packages. Meanwhile, the testVirtualCmakeBootstrapUseConditional method solves the problem by using a dependency conditional on the bootstrap USE flag. Bug: https://bugs.gentoo.org/703440 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Updates for portage-2.3.82 releaseportage-2.3.82Zac Medico2019-12-152-1/+11
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* process: display relevant FEATURES when unshare failsZac Medico2019-12-151-2/+13
| | | | | | | | | For example, the message will now look like this: Unable to unshare: EPERM (for FEATURES="ipc-sandbox mount-sandbox network-sandbox pid-sandbox") Bug: https://bugs.gentoo.org/680456 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge-webrsync: support gentoo-YYYYMMDD snapshotsZac Medico2019-12-151-5/+7
| | | | | | | | Support gentoo-YYYYMMDD snapshots for forward compatibility, and portage-YYYYMMDD snapshots for backward compatibility. Bug: https://bugs.gentoo.org/693454 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge-webrsync: enable xz snapshots for tarsyncZac Medico2019-12-141-5/+1
| | | | | | | There's xz support in current versions of diffball. Bug: https://bugs.gentoo.org/702970 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* emerge: Show package USE in conflict messagesZac Medico2019-12-142-9/+34
| | | | | Bug: https://bugs.gentoo.org/310009 Signed-off-by: Zac Medico <zmedico@gentoo.org>