| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deps like these:
|| ( foo bar ) || ( bar baz )
Translate to disjunctive normal form (DNF):
|| ( ( foo bar ) ( foo baz ) ( bar bar ) ( bar baz ) )
Using DNF, if none of the packages are currently installed,
then the ( bar bar ) choice will be automatically preferred
since it is satisfied by the fewest number of packages.
If the ( foo baz ) choice is already satisfied, then that
choice will be preferred instead.
Since DNF results in exponential explosion of the formula,
only use DNF for the parts of the dependencies that have
overlapping atoms.
In order to simplify the implementation of the dnf_convert
function, this patch also fixes _expand_new_virtuals to
normalize results in the same way as use_reduce (with no
redundant nested lists).
Bug: https://bugs.gentoo.org/632026
Reviewed-by: Manuel Rüger <mrueg@gentoo.org>
Reviewed-by: Alec Warner <antarus@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Prefer to install a new package rather than to downgrade an
installed package. If the installed package should be
downgraded due to it being masked, then allow the downgrade.
Bug: https://bugs.gentoo.org/635540
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Final commit adds line trim @line 340
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since it's possible for a URI to contain parenthesis, only call
missing_white_space_check for tokens that fail to validate with
token_class. The missing_white_space_check function only serves
to clarify exception messages, so it must not be allowed to
reject valid tokens.
X-Gentoo-Bug: 611838
X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=611838
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When selecting packages to determine which choices have upgrades
or downgrades relative to other choices, make the package selections
internally consistent by choosing a package that satisfies all atoms
in the choice which match a package in the same slot.
Also, fix the Atom.match() method to handle _pkg_str instances,
since dep_zapdeps can pass in _pkg_str instances instead of Package
instances.
X-Gentoo-Bug: 600346
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=600346
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Constrain _expand_new_virtuals output in order to avoid incorrect
re-ordering of || deps in the dep_zapdeps function, as reported in
bug 597752.
The incorrect dep_zapdeps behavior involved a problem in the
construction of the _dep_choice.cp_map dictionary inside the
dep_zapdeps function, with this input:
|| ( dev-java/icedtea-bin:8 =virtual/jdk-1.8.0-r3 >=virtual/jdk-1.5 )
( dev-java/icedtea-bin:7 =virtual/jdk-1.7.0-r2 >=virtual/jdk-1.5 )
The cp_map for virtual/jdk-1.7.0-r2 erroneously contained
virtual/jdk-1.8.0-r3 because that was the highest virtual/jdk matched
by the >=virtual/jdk-1.5 atom. This patch removes the >=virtual/jdk-1.5
atom from the _expand_new_virtuals output, in order to avoid triggering
the erroneous dep_zapdeps behavior. The >=virtual/jdk-1.5 atom is not
completely discarded, since the depgraph is able to access it via the
virt_atom._orig_atom attribute.
In order to demonstrate that this patch solves the problem, run the
command `emerge ant-core` from inside a stage3 chroot, and see that
virtual/jdk:1.8 is favored over virtual/jdk:1.7.
X-Gentoo-Bug: 597752
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=597752
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
| |
compatibility for nonexistent keys.
For nonexistent keys:
- When called by Portage scripts, raise KeyError.
- When called by third-party code, print deprecation warning and continue returning "".
|
|
|
|
|
|
|
|
|
|
|
|
| |
560466)
Make the =* glob match only on boundaries between version parts, in order
to eliminate ambiguity (so that 1* does not match version 10). Only break
compatibility in cases where dependencies have been specified ambiguously.
X-Gentoo-Bug: 560466
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=560466
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
| |
The short name "ia" is never used when referring to Itanium.
It is always "ia64". Make the multilib category match.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support "profile-formats = build-id" setting for layout.conf. When
this is enabled in layout.conf of the containing repository, a
dependency atom in the profile can refer to a specific build, using the
build-id that is assigned when FEATURES=binpkg-multi-instance is
enabled. A build-id atom is identical to a version-specific atom,
except that the version is followed by a hyphen and an integer build-id.
With the build-id profile format, it is possible to assemble a system
using specific builds of binary packages, as users of "binary"
distros might be accustomed to. For example, an atom in the "packages"
file can pull a specific build of a package into the @system set, and
an atom in the "package.keywords" file can be used to modify the
effective KEYWORDS of a specific build of a package.
Refering to specific builds can be useful for a number of reasons. For
example, if a particular build needs to undergo a large amount of
testing in a complex environment in order to verify reliability, then
it can be useful to lock a profile to a specific build that has been
thoroughly tested.
|
|
|
|
|
|
|
|
| |
Do not assume that token_class returns a basestring.
X-Gentoo-Bug: 541198
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=541198
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Soname dependency resolution is disabled by default, since it will not
work correctly unless all available installed and binary packages have
been built by a version of portage which generates REQUIRES and PROVIDES
metadata.
Soname dependency resolution is enabled when --ignore-soname-deps=n is
specified, and one of the following is true:
* --usepkgonly option is enabled
* removal actions (--depclean and --prune)
Soname dependencies are automatically ignored for dependency
calculations that can pull unbuilt ebuilds into the dependency graph,
since unbuilt ebuilds do not have any soname dependency metadata,
making it impossible to determine whether an unresolved soname
dependency can be satisfied. Therefore, --usepkgonly must be used
in order to enable soname depedency resolution when installing packages.
A new soname.provided file is supported for profiles, making it possible
to selectively ignore soname dependencies (see the portage(5) man page).
When soname dependency resolution is enabled, the soname dependencies
are represented as SonameAtom instances which expose an interface that
is minimally compatible with Atom instances. This allows both types of
atoms to be satisfied using mostly the same mechanisms, with minimal
use of conditional logic to handle the differences. Both atom classes
have "soname" and "package" attributes that make it convenient for
conditional code to distinguish package atoms and soname atoms. Both
classes also implement a match method, so that it is possible to match
a Package instance using identical syntax for both types of atoms.
Since soname dependencies and slot-operator := dependencies share many
properties, the slot-operator rebuild code has been generalized to
handle both types of dependencies. Many of the existing unit tests
involving slot-operator dependencies have been copied and adapted to
test soname dependencies (the new tests are located in the
pym/portage/tests/resolver/soname/ directory).
X-Gentoo-Bug: 282639
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=282639
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generate soname dependency metadata for binary and installed packages,
in the form of PROVIDES and REQUIRES metadata. It is useful to generate
PROVIDES and REQUIRES metadata now, so that it will be available
when dependency resolver support is added in the future. Note that
slot-operator dependencies will not be able to serve as a substitute
for soname dependencies for the forseeable future, because system
dependencies are frequently unspecified (according to Gentoo policy).
The PROVIDES/REQUIRES system is very similar to the automatic Requires
and Provides system which is supported by RPM. The PROVIDES/REQUIRES
metadata is generated automatically from the ELF files that are
installed by a package. The PROVIDES/REQUIRES syntax is described in
the /var/db/pkg section of the portage(5) man page. REQUIRES_EXCLUDE
and PROVIDES_EXCLUDE ebuild variables allow for filtering of the
sonames that are saved in REQUIRES and PROVIDES (see the ebuild(5) man
page for details).
The /var/db/pkg NEEDED.ELF.2 format now includes an additional field
which indicates the multilib category, as discussed in bug #534206. The
multilib category is used to categorize the sonames that are listed in
PROVIDES/REQUIRES metadata, since sonames need to be resolved
separately for each multilib category. The complete list of supported
multilib categories is documented in the comments of the
portage.dep.soname.multilib_category module.
X-Gentoo-Bug: 282639
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=282639
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The @changed-deps set is useful, but it has limitations similar to the
@installed set (see bug #387059), which can make it unsuitable for use
when updating the whole system. Therefore, implement two new options
that are analogous to --newuse and --binpkg-respect-use, called
--changed-deps and --binpkg-changed-deps.
The rationale for having a separate --binpkg-* option is the same in
both cases: depending on the situation, people may want different
behavior for binary packages. For example, just like
---binpkg-respect-use is automatically enabled if the user has not
specified --usepkgonly, so is --binpkg-changed-deps (though the user
can explicitly override the automatic behavior). In both cases,
inconsistencies in dependencies are automatically avoided, increasing
the probability of a successful dependency calculation.
X-Gentoo-Bug: 282927
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=282927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some heuristics to handle slot conflicts triggered by interaction
of slot-operator dependencies with dependencies like those of labgl:
ocaml:= || ( labltk <ocaml-4.02 )
The new heuristics involve some behavior modifications in the depgraph
_solve_non_slot_operator_slot_conflicts method and in dep_zapdeps. The
dep_zapdeps changes affect the behavior of _select_atoms_probe calls
in the depgraph _slot_operator_update_probe method.
X-Gentoo-Bug: 531656
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=531656
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This patch causes dep_zapdeps to check which USE flags cause a match
to fail, and uses that information to prioritize choices that do not
require changes to use.mask or use.force.
X-Gentoo-Bug: 515584
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=515584
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fixes various forms of buggy behavior involving virtuals handling
and EAPI 5 subslots. The code at fault is part of the support for
bug #141118 (virtuals lookahead). This code was written long before
subslots existed, and because of them it needs to be updated now.
Previously, the relevant virtuals code would only select one virtual
from each slot for lookahead. Now, it needs to select one from each
slot/subslot pair. The buggy forms of behavior fixed by this change
can be difficult to reproduce, since they only express themselves
under some rare circumstances.
In addition to the _dep_check_composite_db fixes, there is also a
related fix inside _expand_new_virtuals, which is required so that
_slot_operator_update_probe can reliably check whether or not a
particular input atom was selected. Without this change, the
_dep_check_composite_db changes will cause the test from commit
d3be49fe6827aa1974856dffe6d5a1aca80a7bed to fail in a way that is
very similar to the failure reported in bug #526160.
Fixes: d3be49fe6827 ("depgraph: fix bug #526160")
X-Gentoo-Bug: 526160
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=526160
Acked-by: Brian Dolbec <dolsen@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a case with --onlydeps were dep_zapdeps would pull in an
avoidable direct circular dependency on an onlydeps node. The logic
changes only apply to --onlydeps, so there's no chance of regressions
for cases when --onlydeps is not enabled.
X-Gentoo-Bug: 524916
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524916
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
|
|
|
|
|
| |
For cases such as || ( X <A-2 ), where X is unsatisfiable and A-1 is
installed, fix dep_zapdeps to make the correct choice.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes dep_check so that graph packages do not mask non-graph
packages (in the same slot) unless the graph packages also match the
dependency atom being satisfied. This requires logic changes in both
_dep_check_composite_db._visible and dep_zapdeps.
Also, fix _dep_check_composite_db match / _cpv_pkg_map
interactions to ensure correct match results.
X-Gentoo-Bug: 515230
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=515230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the slot operator processing code not remove the := operator from
vdb dependency entries when the underlying package is not installed.
This fixes a bug where dependencies like || ( A:= B:= ) were stored as
|| ( A:0/1= B ) if B was not installed. This especially confused
dependency comparisons in @changed-deps.
With this patch, Portage stores the original := (or :slot=) atom in the
vdb. This fixes the issue while preserving the same behavior in the
current dependency resolver.
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
Acked-by: Brian Dolbec <dolsen@gentoo.org>
Reviewed-by: Zac Medico <zmedico@gentoo.org>
|
|
|
|
| |
Fixes a crash reported on IRC
|
| |
|
|
|
|
| |
Hopefully should be no functional changes here.
|
|
|
|
| |
This broke in commit c08402d745eef26b99091f62556f48aa9b60345a.
|
|
|
|
|
|
| |
This will fix bug #480736, by preferring libpostproc in deps like
|| ( ffmpeg:0 libpostproc ) where libpostproc is already installed and
ffmpeg:0 is not.
|
| |
|
| |
|
|
|
|
|
| |
There's no need to copy the list before calling dep_wordreduce, since
dep_wordreduce copies the list internally.
|
| |
|
|
|
|
|
|
|
| |
Before, a wildcard atom could be treated as valid even though it
specified a version without an operator, as reported at here:
https://forums.gentoo.org/viewtopic-p-7314746.html#7314746
|
| |
|
|
|
|
|
|
| |
This will fix bug #453400, which was triggered by inconsistency
between the enabled USE and the effective missing_disabled set used
in matching logic, due to implicit IUSE.
|
|
|
|
|
| |
This helps to ensure consistent results, regardless of whether we're
using Python 2 or Python 3.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The raw metadata is considered a private low-level internal. This
makes the Package class consistent with the _pkg_str class.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
available_eclasses(), eclass_path() and license_path() functions.
|
| |
|
| |
|
| |
|
| |
|
| |
|