Author: jgg
Date: 2002-04-26 05:36:20 GMT
Prevent protected packages from being DoUpgraded
// -*- 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
{
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;