summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-05-06 12:31:55 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-05-06 12:31:55 +0200
commit2d847a5919828ab26dd3f3c5993497b95df9051b (patch)
tree670a2e8f58d03b50579427536463d6ad96da1cdf
parent448eaf8b5999b6866237a069d678337b647968c4 (diff)
don't suggest held packages as they are installed (Closes: #578135)
-rw-r--r--cmdline/apt-get.cc7
-rw-r--r--debian/changelog1
2 files changed, 5 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 6a3c91a59..de8c7aeaf 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1932,9 +1932,10 @@ bool DoInstall(CommandLine &CmdL)
{
/* Skip if package is installed already, or is about to be */
string target = Start.TargetPkg().FullName(true) + " ";
-
- if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install
- || Cache[Start.TargetPkg()].Install())
+ pkgCache::PkgIterator const TarPkg = Start.TargetPkg();
+ if (TarPkg->SelectedState == pkgCache::State::Install ||
+ TarPkg->SelectedState == pkgCache::State::Hold ||
+ Cache[Start.TargetPkg()].Install())
{
foundInstalledInOrGroup=true;
break;
diff --git a/debian/changelog b/debian/changelog
index d206b1dd8..144d307fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -34,6 +34,7 @@ apt (0.7.26~exp4) UNRELEASED; urgency=low
- show non-candidates as fallback for virtual packages (Closes: #578385)
- set also "all" to this version for pseudo packages in TryToChangeVer
- rerun dpkg-source in source if --fix-broken is given (Closes: #576752)
+ - don't suggest held packages as they are installed (Closes: #578135)
* apt-pkg/deb/dpkgpm.cc:
- remove Chroot-Directory from files passed to install commands.
Thanks to Kel Modderman for report & patch! (Closes: #577226)