| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an atom is the result of virtual expansion, then derefrence it to
_orig_atom in check_reverse_dependencies so that it will be correctly
handled as a built slot operator dependency when appropriate. This
solves a case triggered in bug 764764 where a virtual expansion from
virtual/dist-kernel:0/5.10.5= to =virtual/dist-kernel-5.10.5 prevented
the atom from being handled as a built slot operator dependency, which
prevented rebuilds from being triggered.
Bug: https://bugs.gentoo.org/764764
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Fixes: b991f23ad915 ("Allow a package to replace its own buildtime dependency")
Bug: https://bugs.gentoo.org/757741
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a package has a buildtime dependency on a previous version that
it will replace, then do not treat it as a slot conflict. This
solves inappropriate behavior for dev-lang/rust[system-bootstrap].
This requires adjustments to package selection logic in several
locations, in order to ensure that an installed package instance
will be selected to satisfy a buildtime dependency when
appropriate. Dependencies of the installed package will be
entirely ignored, but that has already been the case when using
installed package to break cycles, as discussed in bug 199856.
Bug: https://bugs.gentoo.org/756793
Bug: https://bugs.gentoo.org/756961
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
I first noticed this in make.conf(5) but it turned out there were many
more occurences of these; fixed with find & sed.
Closes: https://github.com/gentoo/portage/pull/634
Signed-off-by: Petr Šabata <contyk@redhat.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Specify the root to use as the --quickpkg-direct package source. This
root is assumed to be immutable during the entire emerge operation.
The default is set to "/".
Bug: https://bugs.gentoo.org/752066
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a slot conflict occurs due to a missed update, and some other
similar update(s) are available, add the similar update(s) to the
runtime package mask for the same backtracking choice. This reduces
minimum number of backtrack tries required to solve the test case
for bug 743115 from 7 to 4, where the difference of 3 corresponds
to the number of other similar setuptools updates available.
Bug: https://bugs.gentoo.org/743115
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Prefer choices that minimize conflict atoms, so that choices
which satisfy all parents are preferred. This reduces the
minimum necessary backtrack tries from 21 to 7 for the unit
test related to bug 743115.
Bug: https://bugs.gentoo.org/743115
Bug: https://bugs.gentoo.org/743631
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After a slot conflict occurs, allow the highest version to be eliminated
from the graph when appropriate. This is needed for correct behavior in
cases the highest version cannot be installed because an older version
is required by some package. This reverts a change related to bug 531656
from commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0, and that change
no longer appears to be necessary, since the unit tests related to bug
531656 now pass without it.
Due to this change in slot conflict handling, the --changed-slot test
case related to bug 456208 will now fail unless we use an @world update to
trigger rebuilds, therefore fix it to do so.
Bug: https://bugs.gentoo.org/439688
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
* We only support Py3 now.
Signed-off-by: Aaron Bauman <bman@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The codebase appears to have this pattern like:
if foo == bar:
return a
elif foo == baz:
return b
else:
return c
This can often be rewritten as:
if foo == bar:
return a
if foo == baz:
return b
return c
Closes: https://github.com/gentoo/portage/pull/592
Signed-off-by: Alec Warner <antarus@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Some of these are simple variable renames. A few of the uses were
refactored and some were simply disabled; often due to redefinition as
part of a function signature. I did not do any research in terms of API
changes so these were typically left as-is.
Closes: https://github.com/gentoo/portage/pull/587
Signed-off-by: Alec Warner <antarus@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>
|
|
|
|
|
|
|
|
| |
Inheriting from object is not required in py3.
Signed-off-by: Alec Warner <antarus@gentoo.org>
Change-Id: Ia12500d590ef3b7f5852b6af03801d40a8af8fa2
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>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When searching for slot operator rebuilds, respect non slot-operator
components of parent dependencies, so that a <foo-version:= dependency
like the <dev-libs/libgit2-1:0=[ssh?] dependency from bug 717140 will
not be completely ignored. This will prevent erroneous attempts to
trigger slot operator rebuilds for upgrades that would break
<foo-version:= dependencies (which triggered upgrade/downgrade loops
when backtracking tried to resolve the breakage).
Fixes: d569a2d7275c ("_slot_operator_update_probe: fix bug #508762")
Bug: https://bugs.gentoo.org/717140
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the _wrapped_select_pkg_highest_available_imp method to select an
installed package when appropriate for the current --deep=<depth>
setting, even with --update enabled. This prevents violation of the
current --deep=<depth> setting in cases where an installed package
which satisfies a dependency is masked for any reason.
Bug: https://bugs.gentoo.org/712298
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
| |
Un-reverse traversal order for @profile @selected @system.
Bug: https://bugs.gentoo.org/649622
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/490
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/310009
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assume that packages may have implicit dependencies on packages which
belong to the @system set. This option is enabled by default. One of
the effects of disabling this option is to allow the --jobs option
to spawn jobs without accounting for the possiblity of implicit
dependencies on packages that belong to the @system set (this causes
the @system set to behave more like the @profile set).
Bug: https://bugs.gentoo.org/681312
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
When disjunctive dependencies are queued, group together disjunctions
from the same dependency string so that any overlap between them will
trigger expansion to DNF.
Bug: https://bugs.gentoo.org/701996
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
| |
Fixes: 1b3131db0e22 ("emerge --buildpkgonly: respect buildtime hard blockers")
Bug: https://bugs.gentoo.org/689226
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable use of installed packages directly as binary
packages. This is similar to using binary packages produced by
quickpkg(1), but installed packages are used directly as though
they are binary packages. This option only works in combination
with the --root=DIR option, and it comes with the caveat that
packages are only allowed to be installed into the root that
is specified by the --root=DIR option. The other root which
serves as a source of packages is assumed to be immutable
during the entire operation (similar to --buildpkgonly mode).
Default behavior for handling of protected configuration files
is controlled by the QUICKPKG_DEFAULT_OPTS variable. When a
configuration file is not included because it is protected, an
ewarn message is logged.
Suggested use cases:
* Install packages from a buildtime container into an empty root,
in order to create a minimal runtime container (which need not
include a package manager). In a multi-stage Dockerfile, install
runtime files to an empty directory in the build stage, and in
the final stage use COPY to populate a container with the
contents of that directory. For greater efficiency, use buildah
to install directly into a mounted container, avoiding the COPY
step. Use the emerge --usepkgonly and --ignore-soname-deps=n
options to account for soname dependencies, allowing implicit
system dependencies such as glibc to be automatically pulled
into the runtime image.
* Enable a live usb, iso, or pxe image to act as a binary
installer that uses packages installed in the live image as a
source of binary packages.
Bug: https://bugs.gentoo.org/699986
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/689226
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
| |
Use set literals, compile-time str concats, reduce function calls,
especially those on built-in types that can be replaced by operators.
Signed-off-by: Justin Turner Arthur <justinarthur@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add emerge --autounmask-license and --autounmask-use options which are
enabled by default, and disable package.accept_keywords/mask changes by
default. For backward compatibility, previous behavior of
--autounmask=y and --autounmask=n is entirely preserved. Users can
get the old behavior simply by adding --autounmask to the make.conf
EMERGE_DEFAULT_OPTS variable.
Bug: https://bugs.gentoo.org/658648
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to suppress the sort of aggressive backtracking that can
trigger undesirable downgrades as in bug 693836, do not backtrack
for an unsatisfied dependency if there's an available package in
the runtime package mask which was involved in a slot conflict and
satisfied all involved parent atoms. Instead, discard the current
depgraph in favor of other backtracking configurations that may
exist. This case would not have been encountered prior to the fix
for bug 692746 which enabled backtracking for the type of slot
conflict that is detected here.
Fixes: 994ac00aa764 ("_slot_confict_backtrack: consider masking a package matched by all parent atoms (bug 692746)")
Bug: https://bugs.gentoo.org/693836
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atoms (bug 692746)
When a slot conflict occurs involving a package that is matched by all
involved parent atoms, consider masking the package in order to avoid
a possible missed update. The included unit test demonstrates the case
fixed by this patch. There are 2 previously existing unit tests that
require larger backtracking values in order to succeed with this patch,
since more possible solutions are now considered.
Bug: https://bugs.gentoo.org/692746
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Make backtracking continue as long as the backtracker has remaining
nodes to explore. This fixes a case where it would terminate prematurely
when the depgraph.need_restart() method returned False, even though the
backtracker had remaining nodes to explore.
Bug: https://bugs.gentoo.org/693242
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Signed-off-by: Zac Medico <zmedico@gentoo.org>
|
| |
|
|
Closes: https://github.com/gentoo/portage/pull/343
|