summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:58 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:58 +0000
commitd0c59649c2d9194ffb8432e553851322fa3f4933 (patch)
treecf29ee5a05f90f0f98938e7d87f04c6312243f05 /apt-pkg/packagemanager.cc
parent648e3cb48955f82ce2e34c67eb9eefb76138a3b3 (diff)
Reinstall command
Author: jgg Date: 1999-10-22 05:58:54 GMT Reinstall command
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index b76f78b3c..fad40c46a 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.cc,v 1.21 1999/09/30 06:30:34 jgg Exp $
+// $Id: packagemanager.cc,v 1.22 1999/10/22 05:58:54 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
@@ -157,6 +157,7 @@ bool pkgPackageManager::CreateOrderList()
if ((Cache[I].Keep() == true ||
Cache[I].InstVerIter(Cache) == I.CurrentVer()) &&
I.State() == pkgCache::PkgIterator::NeedsNothing &&
+ (Cache[I].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall &&
(I.Purge() != false || Cache[I].Mode != pkgDepCache::ModeDelete ||
(Cache[I].iFlags & pkgDepCache::Purge) != pkgDepCache::Purge))
continue;
@@ -556,7 +557,9 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
}
// Sanity check
- if (Cache[Pkg].Keep() == true && Pkg.State() == pkgCache::PkgIterator::NeedsNothing)
+ if (Cache[Pkg].Keep() == true &&
+ Pkg.State() == pkgCache::PkgIterator::NeedsNothing &&
+ (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
{
_error->Error("Internal Error, trying to manipulate a kept package");
return Failed;