Commit message (Collapse)AuthorAgeFilesLines
* Reformat to use spaces instead of tabs. Also, use blackWolfgang E. Sanyer2021-09-191-525/+712
| | | | | | | | | | | 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>
* MergeOrderTestCase: fix x11-drivers/xf86-video-fbdev slot operator depsZac Medico2020-12-021-4/+4
| | | | | | | | The real ebuild has the x11-base/xorg-server:= dependency in RDEPEND rather than DEPEND. Fixes: 07a604537e74 ("find_smallest_cycle: don't merge satisfied PDEPEND too early") Signed-off-by: Zac Medico <zmedico@gentoo.org>
* find_smallest_cycle: don't merge satisfied PDEPEND too earlyZac Medico2020-12-021-2/+25
| | | | | | | | | | | | | | After PDEPENDs have been neglected by the find_smallest_cycle function, do not try to merge them too early if they are already satisfied by an installed package. This fixes incorrect merge order for PDEPEND cycles involving xorg-server and xorg-drivers, which was triggered by commit 5095c2023595a75e2848f1ad3dbe25b5fb451a44 because it gave PDEPEND higher priority than satisfied buildtime dependencies. Fixes: 5095c2023595 ("find_smallest_cycle: enhance search prioritization") Reported-by: josef64 in #gentoo-portage Bug: https://bugs.gentoo.org/754903 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* find_smallest_cycle: enhance search prioritizationZac Medico2020-11-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Enhance the find_smallest_cycle function to prioritize its search so that it will minimize the use of installed packages to break cycles. When installed packages must be used to break cycles, it will now prefer to do this for runtime dependencies over buildtime dependencies, since it's preferable to build against latest versions of buildtime dependencies whenever possible. This should solve some cases of bug 199856 which have been triggered by unsafe reliance on installed packages to break cycles. The included unit test case demonstrates correct merge order for a dependency calculation involving 6 independent cycles. This test case fails with the master branch, due to a buildtime dependency cycle of 3 packages being merged earlier than cycles of 2 packages. We can generalize this to say that the master branch may use an installed package to break an arbitrarily sized cycle in a somewhat random location, even though that cycle may be composed of smaller independent cycles which would be safer to break individually. Bug: https://bugs.gentoo.org/754903 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* lib/portage/tests/resolver/test_merge_order.py: fix unused-importAaron Bauman2020-08-031-2/+1
| | | | | Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* _serialize_tasks: limit scope of dropped circular dependenciesZac Medico2019-12-261-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Rename pym→lib, for better distutils-r1 interoperabilityMichał Górny2018-07-181-0/+478
Closes: https://github.com/gentoo/portage/pull/343