| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |\
| |
| |
| |
| | |
solver3: Run the test suite, at least the passing tests + some fixes.
See merge request apt-team/apt!349
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We also need to issue a MarkDelete() if the package is marked for
installation currently but should not be, not only if it did not
have a previous version.
This fixes the final test in test-multiarch-barbarian, the others
only needed adjustments to mark all packages as automatic.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When restoring previously solved items, we try to restore items
that have become unsolved again by skipping items that have a
solved solution.
Well at least we thought we did, but we accidentally had a "not"
in there that inverted the meaning, hence we lost work items on
backtracking.
This mostly did not seem to have caused any issues, I stumbled
over it while trying to add `autoremove` listings to `upgrade`,
but fixing it also fixes:
test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
This used to say "E: Broken packages", meaning the solver lost
a non-optional install request and the 2nd stage solver caught
an incomplete solution.
Also test-bug-735967-lib32-to-i386-unavailable restores the legacy
solver behavior, so win win?
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While it seems that libstdc++ is using stable_sort for sort,
we should make this explicit: We don't want items in our queues
to move ahead of earlier items of the same priority.
i.e. consider dependencies, they are grouped by package, we don't
want the sort algorithm to move B=2 ahead if A|B (which expands to
A=2|A=1|B=2|B=1).
|
| | |
| |
| |
| |
| |
| |
| | |
This somewhat improves reliability of not breaking Recommends, e.g.
if the Recommends gets tightened. One test case enabled by this now
is the test-resolver-provider-exchange, which with a simple change
to allow removal of automatically installed packages works now.
|
| | |
| |
| |
| |
| |
| | |
As per the test-suggests-promoted-to-recommends test. This is still
a bit messy as we ignore alternative choices and only check the last
one, but um seems useful?
|
| | |
| |
| |
| |
| | |
The previous commit basically fixes this, it just requires some
minor small adjustments
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes --no-strict-pinning attempting to upgrade all the versions
on the system. Adjust the upgrade test case accordingly:
1) no-strict-pinning pulls in systemd despite it being pinned down due
to a dependenc (this was true before this fix)
2) no-strict-pinning does not pull in the upgrade-simple because nothing
depends on it (this is what the test fixes)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Highlights:
- test-bug-618848-always-respect-user-requests: (Do not) Support 3.0 solver
A manually installed package is never removed just because we request
the removal of its dependency in solver3.
- test-bug-657695-resolver-breaks-on-virtuals: Support 3.0 solver
For manually installed packages, solver 3.0 would require some
new xserver-xorg-video-driver to Conflict+Replace+Provides the
old one (once the logic is implemented), but that does seem
reasonable.
- test-bug-720597-build-dep-purge: Support 3.0 solver
This needs a simple aptmark auto because pkga is removed by the
build-dep. But further adjustments are necessary because it weirdly
tested for no autoremovable packages before installing pkgc.
- test-bug-960705-*: Support 3.0 solver
Bit awkward to deal with; notably the protect to conflict doesn't
actually work anymore and that is a feature these days.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This makes things a bit nicer. We also include a list of passed
tests here, to use with --only to validate solver3 changes, as
well as the list of skipped tests.
But too lazy to implement these for the non-parallel case.
|
| | |
| |
| |
| |
| | |
We do not show them yet, so let's ignore them so we can focus
on getting the rest of the tests to work.
|
| | |
| |
| |
| |
| | |
Implement --solver, --only, -skip flags for the test suite, and
run the test suite with the broken tests skipped against solver3.
|
| | |
| |
| |
| |
| |
| | |
This is mostly going to be useful for the test suite for now,
implement a function there to set it up so we can use it to
improve test suite correctness.
|
| |/
|
|
|
| |
Ignore the Solving dependencies... line in the testing framework
for compatibility with the existing test cases.
|
| |
|
|
|
|
|
| |
When -o Dir::Cache::pkgcache or -o Dir::Cache is set to /dev/null
we accidentally changed its mode to 0666; which is certainly not
intended. Avoid this issue by exiting the function early if the
file specified is /dev/null.
|
| |
|
|
|
|
|
|
| |
Another instance of our parser written for sane clean input, but
nowadays used also for user-provided input which can contain very many
strange formatting and especially white spaces all over the place.
Closes: #1071219
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Companion of the previous commit that uses the same reasoning, but from
the other side of the logic (as we start from reverse deps here) so that
we are dropping the useless NEW from the solution.
Ideally this code would not live in -private, but in -pkg, but there is
not really a pre-existent good central place for this currently as a
sort-of fixup for our default resolver given this is the result of
resolver decision to not do something which had ripple effects that
aren't reverted along with it.
It is a bit unlikely that this is fixing all instances that this bug
has given we have dealt with a few instances of it already as they are
relatively obscure situations to clean up after and the cost of being
wrong (= autoremover generating breaks) is much higher than being
correct (= no pointless install – that is likely installed later anyhow
after the temporary automatic hold is lifted). And by virtue of being
the result of mostly temporary situations its also unlikely to be
debugable in hindsight months later; so if there is another situation,
its better to deal with it in a new bugreport.
Closes: #839546
|
| |
|
|
|
|
|
|
|
|
|
| |
The test is actually documenting another bug hidden a bit by this one as
we do not need to install a NEW package in this situation as the upgrade
needing it was kept back, but it was protected from considering it to
be autoremoveable as all providers tend to be considered protected, but
by limiting us to installed providers if we have some we can drag those
new packages out of hiding.
Now, we "just" have to get right of the NEW package in a next step.
|
| |
|
|
|
|
|
|
|
|
| |
Removing every line with at least three characters at the end makes
comparisons for output differences rather easy to pass. The intend
was to match for '\.\.\.' but given we have to adapt the strings to
include autoremove remarks we can also include the string that appeared
now that state information is provided (in the form of autobits).
Regession-Of: 734eb9ac3f65e38ac3ba7f2d50ea206743a6f611
|
| | |
|
| |\
| |
| |
| |
| | |
Initial implementation of the 3.0 solver
See merge request apt-team/apt!347
|
| | |
| |
| |
| |
| | |
This invokes the 3.0 solver. It has a nicer name for
a binary, matching the communicated codename.
|
| | |
| |
| |
| |
| |
| | |
It relies on removing packages, so we must allow it to. To see
if it does the right thing, mark all packages automatically
installed.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a simple backtracking brute-force solver with heurisitcs,
this initial version has the following known gaps:
- Errors are not kept from branches, the error reporting after
backtracking isn't particularly useful.
- We cannot show automatically removed packages
- We cannot replace packages with others
- We do not have conflict-driven clause learning yet
Untested:
- Multi-arch
This solver is fundamentally different in key aspects:
- It solves smaller dependency groups before larger ones, leading
us to avoid installing A in A|B if B is installed more often and
more consistently.
- It only keeps the automatic packages reachable via the strongest
path. Currently it only implements autoremoval, but not display
of autoremoval as we simply enqueue all automatically installed
packages at the end when not doing automatic removal.
This will need some translation where we Solve() first, and then
Solve() again with the automatically installed packages added such
that we can mark them as Garbage for display purposes.
- It does not remove manually installed packages.
Hook the solver in via the EDSP framework, this allows us to achieve
easy initial integration without lots of issues.
A lot of this work was planned and executed in my free time and then
some leaked into work time I suppose.
Implementation notes:
- Restore the full backlog of items
The annoying thing is that we record only when an item was enqueued
and not the level at which it was installed, so when going back a
decision level we might have to reinstall packages that were queued
at an earlier decision level because they were only installed at a
later decision level.
- When picking one version, reject the others
- Propagate conflicts up to reverse dependencies
This will recursively mark every reverse dependency that can
no longer be satisfied as MUSTNOT.
Also make sure to recursively call Reject(Ver) from Reject(Pkg)
to make sure we trigger the Rejections there.
This means we now end up having Recursion in the algorithm. An
alternative approach would be to push *reject* items to the heap
and then do them, but this is not entirely straight forward and
it may simply not be necessary.
- Sort upgrades before other optional installs containing subsets
If I want to upgrade a package A, I schedule A3|A2|A1; if another
thing depends specifically on A1; we'd not be installed. Hence we
need to sort upgrades first.
This only is needed for optional packages; manual packages will
figure this out naturally.
- Rescoring is lazily implemented. Instead of calling make_heap()
after rescoring items, we just mark the items as dirty and reinsert
them. We also only rescore from the main solve loop, Reject() marks
the heap as needing a rescore due to a Conflict (as some versions will
no longer be installable), and RescoreWorkIfNeeded() then will do the
rescoring.
- Recursive unit propagation: Install() and Reject() recursively call
each other to promote decisions across single-version dependencies
(or across not-anymore satisfiable reverse-depends).
- Make Reason constructors explicit, this enhances readability
This makes calls like the one in here be
Reject(object, Reason(otherObject))
Ensuring that it's clear that the 2nd argument is a reason at the
caller side.
- Split Decision into Decision and Hint vs. first draft
When branching/deciding, we do not want to override SHOULD and MAY.
We do not actually use them yet, and we do actually clean them when
backtracking, but let's at least keep the data structure correct.
Convert the enum to a 16-bit integer so we can still fit in the same
space as before.
|
| |
|
|
| |
Closes: #1070143
|
| |
|
|
| |
Closes: #1070142
|
| |
|
|
|
|
|
| |
This improves readability a bit more as it's visually easier
to tell " " and "-" apart than " " and "-".
Closes: #1070064
|
| |\
| |
| |
| |
| | |
showsrc, source, build-dep: Support src:name
See merge request apt-team/apt!346
|
| | |
| |
| |
| | |
This has the same behavior as --only-source name.
|
| | |
| |
| |
| | |
This has the same meaning as --only-source name
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If dpkg-gencontrol was involved in the creation of a package we will not
usually encounter empty or otherwise useless fields, but apparently not
everyone is using it.
It isn't recommended to have these empty lines, but it isn't too hard to
ignore for Provides as we did for dependencies already and apt-ftparchive
can be convinced to produce empty files (if you feed it such a package)
as well, so lets be nice and provide users with a more accepting parser.
Closes: #1069874
|
| |\ \
| |/
|/|
| |
| | |
Split out of mostly independent fixes: cmake execute errors, removed rev-deps, protected garbage & co
See merge request apt-team/apt!345
|
| | |
| |
| |
| |
| | |
Our code does the right thing currently, so lets add a test to ensure
this keeps being the case in the future.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our autoremoval-advertisment is modified by SUDO_USER as if the current
apt call was made with sudo it seems a good idea to show the ad with
sudo as well. That is annoying for our tests through as normally the
tests are run locally or by autopkgtest without sudo, but in Gitlab CI
we use it (to run our tests as user… as we are already root) and so
individual tests had to deal with this.
That is annoying and really not needed as we can have our autoremove
test check that this ad gets displayed the right way and ignore it the
rest of the time.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We schedule reverse dependencies for an upgrade, but we shouldn't do it
if we have ear-marked this package for removal later on. Usually the
solver will end up doing the right thing like it already did in the
included testcase in the end, but given that before it reaches the right
end it explored a bad path which can lead to more installs and removals
influencing later decisions or are just too hard for the resolver to
undo later on, we can just not explore this path to begin with.
References: e077370ffcb3669a50a600e80356c2002e6b176d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We remove new garbage packages from the solution if we can as installing
a new package which is at the same time considered garbage looks silly,
but it could also be a new dependency of another garbage package, so we
have a second round trying to save such packages. In this round we
weren't considering versioned constraints on dependency relations through
so even an unsatisfied old recommends could save which it shouldn't.
|
| | |
| |
| |
| |
| |
| |
| | |
Not all commands show kept back packages, so even if it hardly matters,
lets not crunch numbers needlessly if we don't need the info which also
reduces the lifetime of the involved variables hopefully also reducing
the mental requirements for a reader.
|
| |/
|
|
|
|
| |
Ignoring errors might lead to failures later on anyhow, but especially
with triehash it could also lead to broken builds or other crazy stuff,
so lets better be save than sorry.
|
| |
|
|
|
| |
This turned out to be a bit too bold for most of them, given their
informational nature.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
UI changes for 2.9.2
See merge request apt-team/apt!343
|
| | |
| |
| |
| |
| |
| | |
This avoids awkward interactions with Installing dependencies and
Suggested packages appearing before it; despite being triggered by
it.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Add a new `note` field to `ShowList` which contains a line to
be displayed after the list itself. This allows `ShowList` to
render a self-contained list block.
|
| | |
| |
| |
| | |
We should pass this properly to the TagSection.write()
|
| | | |
|