summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-12-18 10:45:24 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-12-18 10:45:24 +0100
commit9c59aadaae0b6c1286608ad87b468e7463adf8d9 (patch)
tree0f1ab1bfbedd14937eb498f1aaca956ad621c80d
parent9169c8714c7f6f7126a8d87265897d510e5422f3 (diff)
fix order of upgrade, install check because for a upgrade "Install()" returns True as well
-rw-r--r--apt-pkg/deb/dpkgpm.cc10
1 files changed, 5 insertions, 5 deletions
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());