// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: algorithms.cc,v 1.22 1999/07/20 05:53:33 jgg Exp $
+// $Id: algorithms.cc,v 1.23 1999/07/30 02:54:25 jgg Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
// We loop indefinately to get the minimal set size.
bool Change = false;
+ unsigned int Count = 0;
do
{
Change = false;
// Not interesting
if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true)
continue;
-
+
// Keep it and see if that is OK
Cache.MarkKeep(I);
if (Cache.BrokenCount() != 0)
Cache.MarkInstall(I,false);
else
- Change = true;
+ {
+ // If keep didnt actually do anything then there was no change..
+ if (Cache[I].Upgrade() == false)
+ Change = true;
+ }
}
+ Count++;
}
- while (Change == true);
+ while (Change == true && Count < 10);
if (Cache.BrokenCount() != 0)
return _error->Error("Internal Error in pkgMinimizeUpgrade");
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: deblistparser.cc,v 1.21 1999/07/26 17:46:08 jgg Exp $
+// $Id: deblistparser.cc,v 1.22 1999/07/30 02:54:25 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
Status: want flag status
want = unknown, install, hold, deinstall, purge
flag = ok, reinstreq, hold, hold-reinstreq
- status = not-installed, unpacked, half-configured, uninstalled,
+ status = not-installed, unpacked, half-configured,
half-installed, config-files, post-inst-failed,
removal-failed, installed
{"unpacked",pkgCache::State::UnPacked},
{"half-configured",pkgCache::State::HalfConfigured},
{"installed",pkgCache::State::Installed},
- {"uninstalled",pkgCache::State::UnInstalled},
{"half-installed",pkgCache::State::HalfInstalled},
{"config-files",pkgCache::State::ConfigFiles},
{"post-inst-failed",pkgCache::State::HalfConfigured},
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.27 1999/07/26 17:46:07 jgg Exp $
+// $Id: pkgcache.cc,v 1.28 1999/07/30 02:54:25 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
Pkg->CurrentState == pkgCache::State::HalfConfigured)
return NeedsConfigure;
- if (Pkg->CurrentState == pkgCache::State::UnInstalled ||
- Pkg->CurrentState == pkgCache::State::HalfInstalled ||
+ if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||
Pkg->InstState != pkgCache::State::Ok)
return NeedsUnpack;
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.h,v 1.21 1999/07/15 03:15:48 jgg Exp $
+// $Id: pkgcache.h,v 1.22 1999/07/30 02:54:25 jgg Exp $
/* ######################################################################
Cache - Structure definitions for the cache file
enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4};
enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
- UnInstalled=3,HalfInstalled=4,ConfigFiles=5,Installed=6};
+ HalfInstalled=4,ConfigFiles=5,Installed=6};
};
struct Flag