summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:39 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:39 +0000
commit813c8eea956b2dee1e7a4a8018a1e94880a2cfbf (patch)
tree133673154804728ea55fb8c2245d01e9dd429536 /apt-pkg/depcache.cc
parenteec898ad83d383f27b94f747245fe82fe11949b0 (diff)
Fixed segfault in re-install/upgrade condition
Author: jgg Date: 1999-04-28 22:48:44 GMT Fixed segfault in re-install/upgrade condition
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 7d1ff05ea..36abcddd4 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.cc,v 1.17 1999/04/16 21:46:13 jgg Exp $
+// $Id: depcache.cc,v 1.18 1999/04/28 22:48:45 jgg Exp $
/* ######################################################################
Dependency Cache - Caches Dependency information.
@@ -519,6 +519,12 @@ void pkgDepCache::MarkKeep(PkgIterator const &Pkg,bool Soft)
// Simplifies other routines.
if (Pkg.end() == true)
return;
+
+ /* Reject an attempt to keep a non-source broken installed package, those
+ must be upgraded */
+ if (Pkg.State() == PkgIterator::NeedsUnpack &&
+ Pkg.CurrentVer().Downloadable() == false)
+ return;
/* We changed the soft state all the time so the UI is a bit nicer
to use */