]> git.saurik.com Git - apt.git/commitdiff
Prevent protected packages from being DoUpgraded
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:59:13 +0000 (16:59 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:59:13 +0000 (16:59 +0000)
Author: jgg
Date: 2002-04-26 05:36:20 GMT
Prevent protected packages from being DoUpgraded

apt-pkg/algorithms.cc

index 0cc4388af130b54f6f1c74d2e3638ae25f86d107..aa3e86568cb88c2b6c902df8eb79d6889b6ac5aa 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: algorithms.cc,v 1.40 2002/04/25 05:45:18 jgg Exp $
+// $Id: algorithms.cc,v 1.41 2002/04/26 05:36:20 jgg Exp $
 /* ######################################################################
 
    Algorithms - A set of misc algorithms
 /* ######################################################################
 
    Algorithms - A set of misc algorithms
@@ -558,6 +558,8 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg)
 {
    if ((Flags[Pkg->ID] & Upgradable) == 0 || Cache[Pkg].Upgradable() == false)
       return false;
 {
    if ((Flags[Pkg->ID] & Upgradable) == 0 || Cache[Pkg].Upgradable() == false)
       return false;
+   if ((Flags[Pkg->ID] & Protected) == Protected)
+      return false;
    
    Flags[Pkg->ID] &= ~Upgradable;
    
    
    Flags[Pkg->ID] &= ~Upgradable;