summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-22 21:55:02 +0200
committerMichael Vogt <mvo@debian.org>2013-10-22 21:55:02 +0200
commit4b9969da40ff1dff2f5787feff5103c873c57f7f (patch)
tree1645053b56c0344894fea43f58e7f92536b38b5f
parent2b4e2e839ad6031061ffb0c58b1065a744d5a300 (diff)
fix failing ./test/integration/test-disappearing-packages (thanks Donkult) - ported from the mvo/feature/install-progress-refactor branch
-rw-r--r--apt-pkg/deb/dpkgpm.cc19
-rwxr-xr-xtest/integration/test-disappearing-packages2
2 files changed, 6 insertions, 15 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 0ebd9f28b..ae895c9e6 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -555,16 +555,6 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
{
pkgname = APT::String::Strip(list[2]);
action = APT::String::Strip(list[1]);
-
- // this is what we support in the processing stage
- if(action != "install" && action != "configure" &&
- action != "remove" && action != "purge" && action != "purge")
- {
- if (Debug == true)
- std::clog << "ignoring processing action: '" << action
- << "'" << std::endl;
- return;
- }
}
// "status" has the form: "status: pkg: state"
// with state in ["half-installed", "unpacked", "half-configured",
@@ -724,12 +714,13 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
// DPkgPM::handleDisappearAction /*{{{*/
void pkgDPkgPM::handleDisappearAction(string const &pkgname)
{
- // record the package name for display and stuff later
- disappearedPkgs.insert(pkgname);
-
pkgCache::PkgIterator Pkg = Cache.FindPkg(pkgname);
if (unlikely(Pkg.end() == true))
return;
+
+ // record the package name for display and stuff later
+ disappearedPkgs.insert(Pkg.FullName(true));
+
// the disappeared package was auto-installed - nothing to do
if ((Cache[Pkg].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto)
return;
@@ -1332,7 +1323,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
{
if((*I).Pkg.end() == true)
continue;
- if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.Name()) != disappearedPkgs.end())
+ if (I->Op == Item::Configure && disappearedPkgs.find(I->Pkg.FullName(true)) != disappearedPkgs.end())
continue;
// We keep this here to allow "smooth" transitions from e.g. multiarch dpkg/ubuntu to dpkg/debian
if (dpkgMultiArch == false && (I->Pkg.Arch() == nativeArch ||
diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages
index 09dbf7014..3b1e1bd7c 100755
--- a/test/integration/test-disappearing-packages
+++ b/test/integration/test-disappearing-packages
@@ -40,7 +40,7 @@ echo "The following package disappeared from your system as
all files have been overwritten by other packages:
old-pkg
Note: This is done automatically and on purpose by dpkg." > $COMPAREFILE
-$CMD 2>&1 | tail -n 4 | diff $COMPAREFILE - && msgpass || msgfail
+$CMD 2>&1 | tail -n 4 | diff -u $COMPAREFILE - && msgpass || msgfail
rm $COMPAREFILE
sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e "s#:$(getarchitecture 'native') #:native #"