From 9c59aadaae0b6c1286608ad87b468e7463adf8d9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 18 Dec 2009 10:45:24 +0100 Subject: fix order of upgrade, install check because for a upgrade "Install()" returns True as well --- apt-pkg/deb/dpkgpm.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 480ffd169..6984c64c1 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -586,7 +586,11 @@ bool pkgDPkgPM::OpenLog() string remove, purge, install, upgrade, downgrade; for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { - if (Cache[I].Install()) + if (Cache[I].Upgrade()) + upgrade += I.Name() + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string(") "); + else if (Cache[I].Downgrade()) + downgrade += I.Name() + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string(") "); + else if (Cache[I].Install()) install += I.Name() + string(" (") + Cache[I].CandVersion + string(") "); else if (Cache[I].Delete()) { @@ -595,10 +599,6 @@ bool pkgDPkgPM::OpenLog() else remove += I.Name() + string(" (") + Cache[I].CurVersion + string(") "); } - else if (Cache[I].Upgrade()) - upgrade += I.Name() + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string(") "); - else if (Cache[I].Downgrade()) - downgrade += I.Name() + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string(") "); } if (install.size() > 0) fprintf(history_out, "Install: %s\n", install.c_str()); -- cgit v1.2.3