summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-07-16 23:15:55 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-07-16 23:15:55 +0200
commit86fdeec2a76f6b134ee8400eb1e53d06fe0974fe (patch)
treeb1d2b05cf27d1ee0b632398c8603201207ea1646 /apt-pkg
parentc7a629dd114c41a1244744e2f5085df2f505dc90 (diff)
fix if-clause to generate hook-info for 'rc' packages
The code incorrectly skips printing of current version information, if the package has no current version (for APT, but for dpkg as it is the case for packages which are removed but not purged) by using an unintended "else if" rather than an "if". Closes: 717006
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index fb0473535..d8fc8ef68 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -294,7 +294,7 @@ bool pkgDPkgPM::SendPkgsInfo(FILE * const F, unsigned int const &Version)
if (CurVer.end() == true && (I->Op == Item::Remove || I->Op == Item::Purge))
CurVer = FindNowVersion(I->Pkg);
- else if (CurVer.end() == true)
+ if (CurVer.end() == true)
{
if (Version <= 2)
fprintf(F, "- ");