summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:59:13 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:59:13 +0000
commit3a48630505772d0cf3ae781490331ba8d5f34536 (patch)
tree8a587e2ba0739ec279b1bd93c50ef9ff863a27a6 /apt-pkg
parent7a3c2ab0e9c5b2b5eba10c8670b01ffc37848060 (diff)
Prevent protected packages from being DoUpgraded
Author: jgg Date: 2002-04-26 05:36:20 GMT Prevent protected packages from being DoUpgraded
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/algorithms.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 0cc4388af..aa3e86568 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1,6 +1,6 @@
// -*- 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
@@ -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] & Protected) == Protected)
+ return false;
Flags[Pkg->ID] &= ~Upgradable;