<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/depcache.h, branch 2.1.19</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.1.19</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.1.19'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-01-04T09:43:31Z</updated>
<entry>
<title>depcache: Cache our InRootSetFunc</title>
<updated>2021-01-04T09:43:31Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-17T12:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=290a4cf9455f45895718ed698147061fcd0a2dcb'/>
<id>urn:sha1:290a4cf9455f45895718ed698147061fcd0a2dcb</id>
<content type='text'>
This avoids the cost of setting up the function every time
we mark and sweep.
</content>
</entry>
<entry>
<title>Delay removals due to Conflicts until Depends are resolved</title>
<updated>2020-07-02T16:57:11Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-06-19T11:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3e39efa31da463ca05016513835d9a5388f80f90'/>
<id>urn:sha1:3e39efa31da463ca05016513835d9a5388f80f90</id>
<content type='text'>
Marking a package for removal is fine if we know that we have to remove
that package, but if we are in an alternative branch we might not go
this route in the end and hence have a package pointlessly marked for
removal which isn't questioned later on.

We check if we are allowed to remove that package to avoid working on
the positive dependencies if not, but we mark them for removal only
after all the other dependencies are successfully resolved.

In an ideal world we would let the problemResolver do its job on them,
but the resolver might decide against doing the removal exploring
another option like the next alternative, which might be a good idea,
but is not the behaviour we had before, so that is the best we can do
for now without changing the resolver drastically.
</content>
</entry>
<entry>
<title>Allow pkgDepCache to be asked to check internal consistency</title>
<updated>2020-05-24T19:02:35Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-23T14:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2ba86f95bfad4ec00a3b99b311d05c158162b25c'/>
<id>urn:sha1:2ba86f95bfad4ec00a3b99b311d05c158162b25c</id>
<content type='text'>
For speed reasons pkgDepCache initializes its state once and then has a
battery of update calls you have to invoke in the right order to update
the various states – all in the name of speed. In debug and/or
simulation mode we can sacrifice this speed for a bit of extra checking
though to verify that we haven't made some critical mistake like #961266.
</content>
</entry>
<entry>
<title>Reset candidate version explicitly for internal state-keeping</title>
<updated>2020-05-23T15:58:42Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-22T16:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=04a020d7a217d6b5af86c048c2974760053b8079'/>
<id>urn:sha1:04a020d7a217d6b5af86c048c2974760053b8079</id>
<content type='text'>
For a (partially) installed package like the one MarkInstall operates on
at the moment we want to discard the candidate from, we have to first
remove the package from the internal state keeping to have proper broken
counts and such and only then reset the candidate version which is a
trivial operation in comparison.

Take a look at the testcase: Now, what is the problem? Correct,
git:i386. Didn't see that coming, right? It is M-A:foreign so apt tries
to switch the architecture of git here (which is pointless, it knows
that this won't work, but lets fix that in another commit) will
eventually realize that it can't install it and wants to discard the
candidate of git:i386 first removing the broken indication like it
should, removing the install flag and then reapplies the broken
indication: Expect it doesn't as it wants to do that over the candidate
version which the package no longer had so seemingly nothing is broken.

It is a bit of a hairball to figure out which commit it is exactly that
is wrong here as they are all influencing each other a bit, but &gt;= 2.1
is an acceptable ballpark. Bisect says 57df273 but that is mostly a lie.

Closes: #961266
</content>
</entry>
<entry>
<title>Move the MarkInstall helpers into static functions</title>
<updated>2020-05-18T13:55:36Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-15T22:46:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a08c55c0a5ba5760a24b9fa14ffd12332fdf04f8'/>
<id>urn:sha1:a08c55c0a5ba5760a24b9fa14ffd12332fdf04f8</id>
<content type='text'>
Reducing the scope of these helpers might allow us to move them
elsewhere and share them or it is a rather pointless exercise,
we will see where it leads us to later on.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>Keep going if a dep is bad for user requests to improve errors</title>
<updated>2020-05-18T13:55:36Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-15T14:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=65ce0eb3c0d71031c59c14c7e433b0b969548978'/>
<id>urn:sha1:65ce0eb3c0d71031c59c14c7e433b0b969548978</id>
<content type='text'>
We exit early from installing dependencies of a package only if it is
not a user request to avoid polluting the state with installs which
might not be needed (or detrimental even) for alternative choices.

We do continue with installing dependencies though if it is a user
request as it will improve error reporting for apt and can even help
aptitude not hang itself so much as we trim the problem space down for
its resolver dealing with all the easy things.

Similar things can be said about the testcase I have short-circuit
previously… keep going test, do what you should do to report errors!
</content>
</entry>
<entry>
<title>Allow aptitude to MarkInstall broken packages via FromUser</title>
<updated>2020-05-08T13:52:14Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-08T10:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=30fa50e8d593556553147478a2d5ea7a550f9e16'/>
<id>urn:sha1:30fa50e8d593556553147478a2d5ea7a550f9e16</id>
<content type='text'>
apt marks packages coming from the commandline among others
as protected to ensure the various resolver parts do not fiddle
with the state of these packages. aptitude (and potentially others)
do not so the state is modified (to a Keep which for uninstalled means
it is not going to be installed) due to being uninstallable before
the call fails – basically reverting at least some state changes the
call made before it realized it has to fail, which is usually a good
idea, except if users expect you to not do it.

They do set the FromUser option though which has beside controlling
autobit also gained the notion of "the user is always right" over time
and can be used for this one here as well preventing the state revert.

References: 0de399391372450d0162b5a09bfca554b2d27c3d
Reported-By: Jessica Clarke &lt;jrtc27@debian.org&gt; on IRC
</content>
</entry>
<entry>
<title>Protect a package while resolving in MarkInstall</title>
<updated>2020-04-27T11:51:46Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-04-27T11:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ae23e53f99ea0b7920744a7303fdee64796b7cce'/>
<id>urn:sha1:ae23e53f99ea0b7920744a7303fdee64796b7cce</id>
<content type='text'>
Strange things happen if while resolving the dependencies of a package
said dependencies want to remove the package. The allow-scores test e.g.
removed the preferred alternative in favor of the last one now that they
were exclusive. In our or-group for Recommends we would "just" not
statisfy the Recommends and for Depends we engage the ProblemResolver…
</content>
</entry>
<entry>
<title>Propagate Protected flag to single-option dependencies</title>
<updated>2020-04-27T11:49:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-04-27T11:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f76a8d331a81bc7b102bdd4e0f8363e8a59f64f6'/>
<id>urn:sha1:f76a8d331a81bc7b102bdd4e0f8363e8a59f64f6</id>
<content type='text'>
If a package is protected and has a dependency satisfied only by a single
package (or conflicts with a package) this package must be part of the
solution and so we can help later actions not exploring dead ends by
propagating the protected flag to these "pseudo-protected" packages.

An (obscure) bug this can help prevent (to some extend) is shown in
test-apt-never-markauto-sections by not causing irreversible autobit
transfers.

As a sideeffect it seems also to help our crude ShowBroken to display
slightly more helpful messages involving the packages which are actually
in conflict.
</content>
</entry>
<entry>
<title>Fail earlier on impossible Conflicts in MarkInstall</title>
<updated>2020-04-27T11:48:33Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-04-27T11:48:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=347ea3f76ab263c729468e07b910ae027b66c9d8'/>
<id>urn:sha1:347ea3f76ab263c729468e07b910ae027b66c9d8</id>
<content type='text'>
MarkDelete is not recursive as MarkInstall is and we can not conflict
with ourselves anyhow, so we can move the unavoidable deletes before
changing the state of the package in question avoiding the need for the
state update in case of conflicts we can not deal with (e.g. the package
conflicts with an explicit user request).
</content>
</entry>
</feed>
