diff options
author | David Kalnischkies <david@kalnischkies.de> | 2020-05-22 18:56:40 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2020-05-23 17:58:42 +0200 |
commit | 04a020d7a217d6b5af86c048c2974760053b8079 (patch) | |
tree | dd07954a2327cb2c00a19292ccd1562e18c18205 /apt-pkg/depcache.h | |
parent | 9d0a37e9cf644f99666b60e5a1ca5131fd0c6519 (diff) |
Reset candidate version explicitly for internal state-keeping
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 >= 2.1
is an acceptable ballpark. Bisect says 57df273 but that is mostly a lie.
Closes: #961266
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r-- | apt-pkg/depcache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index fa4da36a6..ff1b37374 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -520,7 +520,7 @@ class APT_PUBLIC pkgDepCache : protected pkgCache::Namespace unsigned long const Depth, bool const FromUser); APT_HIDDEN bool MarkInstall_StateChange(PkgIterator const &Pkg, bool AutoInst, bool FromUser); - APT_HIDDEN bool MarkInstall_Discard(PkgIterator const &Pkg); + APT_HIDDEN bool MarkInstall_DiscardInstall(PkgIterator const &Pkg); }; #endif |