summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/depcache.cc2
-rwxr-xr-xtest/integration/test-bug-632221-cross-dependency-satisfaction2
-rwxr-xr-xtest/integration/test-bug-961266-hold-means-hold24
3 files changed, 12 insertions, 16 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 39e30a38d..fa0bd8ed5 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1115,7 +1115,9 @@ static bool MarkInstall_DiscardCandidate(pkgDepCache &Cache, pkgCache::PkgIterat
{
auto &State = Cache[Pkg];
State.CandidateVer = State.InstallVer;
+ auto const oldStatus = State.Status;
State.Update(Pkg, Cache);
+ State.Status = oldStatus;
return true;
}
/*}}}*/
diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction
index 752e2ad63..d52652cad 100755
--- a/test/integration/test-bug-632221-cross-dependency-satisfaction
+++ b/test/integration/test-bug-632221-cross-dependency-satisfaction
@@ -296,7 +296,7 @@ The following packages will be REMOVED:
The following NEW packages will be installed:
amdboot:amd64 arm-stuff cool doxygen libc6 libc6-dev libfwibble-dev
libfwibble1
-0 upgraded, 8 newly installed, 1 to remove and 2 not upgraded.
+0 upgraded, 8 newly installed, 1 to remove and 1 not upgraded.
Remv cool:amd64 [0.5]
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst arm-stuff (1.0 unstable [armel])
diff --git a/test/integration/test-bug-961266-hold-means-hold b/test/integration/test-bug-961266-hold-means-hold
index a104bfc31..89c18ba85 100755
--- a/test/integration/test-bug-961266-hold-means-hold
+++ b/test/integration/test-bug-961266-hold-means-hold
@@ -57,19 +57,13 @@ NOUPGRADE='Reading package lists...
Building dependency tree...
Calculating upgrade...
The following packages have been kept back:
- git
-0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.'
-NOUPGRADE2='Reading package lists...
-Building dependency tree...
-Calculating upgrade...
-The following packages have been kept back:
git git-cvs
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.'
testsuccessequal "$NOUPGRADE" apt upgrade -s
testsuccessequal "$NOUPGRADE" apt full-upgrade -s
testsuccessequal "$NOUPGRADE" aptget dist-upgrade -s
-testsuccessequal "$NOUPGRADE2" aptget upgrade -s
+testsuccessequal "$NOUPGRADE" aptget upgrade -s
testfailureequal 'Reading package lists...
Building dependency tree...
@@ -89,10 +83,10 @@ testsuccessequal 'Canceled hold on git.' aptmark unhold git
testsuccessequal 'git-cvs set on hold.' aptmark hold git-cvs
testsuccessequal 'git-cvs' aptmark showholds
-testsuccessequal "$NOUPGRADE2" apt upgrade -s
-testsuccessequal "$NOUPGRADE2" apt full-upgrade -s
-testsuccessequal "$NOUPGRADE2" aptget upgrade -s
-testsuccessequal "$NOUPGRADE2" aptget dist-upgrade -s
+testsuccessequal "$NOUPGRADE" apt upgrade -s
+testsuccessequal "$NOUPGRADE" apt full-upgrade -s
+testsuccessequal "$NOUPGRADE" aptget upgrade -s
+testsuccessequal "$NOUPGRADE" aptget dist-upgrade -s
testfailureequal 'Reading package lists...
Building dependency tree...
@@ -112,10 +106,10 @@ testsuccessequal 'git set on hold.' aptmark hold git
testsuccessequal 'git
git-cvs' aptmark showholds
-testsuccessequal "$NOUPGRADE2" apt upgrade -s
-testsuccessequal "$NOUPGRADE2" apt full-upgrade -s
-testsuccessequal "$NOUPGRADE2" aptget upgrade -s
-testsuccessequal "$NOUPGRADE2" aptget dist-upgrade -s
+testsuccessequal "$NOUPGRADE" apt upgrade -s
+testsuccessequal "$NOUPGRADE" apt full-upgrade -s
+testsuccessequal "$NOUPGRADE" aptget upgrade -s
+testsuccessequal "$NOUPGRADE" aptget dist-upgrade -s
testfailureequal 'Reading package lists...
Building dependency tree...