summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:41 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:41 +0000
commit6c139d6e362f04a1582e8a8f511f8aeab031fecf (patch)
treec200b8f51da9bcfe612b7ceb645e6eec9ebac9f1 /apt-pkg/pkgcache.cc
parent2246928b428c3ece2c2743da5b0bb63257e37a85 (diff)
Sync
Author: jgg Date: 1998-07-07 04:17:00 GMT Sync
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index b9dbf34ec..085225031 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.4 1998/07/05 05:33:53 jgg Exp $
+// $Id: pkgcache.cc,v 1.5 1998/07/07 04:17:02 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -20,6 +20,10 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#ifdef __GNUG__
+#pragma implementation "pkglib/pkgcache.h"
+#pragma implementation "pkglib/cacheiterators.h"
+#endif
#include <pkglib/pkgcache.h>
#include <pkglib/version.h>
#include <pkglib/error.h>
@@ -199,13 +203,13 @@ void pkgCache::PkgIterator::operator ++(int)
/* By this we mean if it is either cleanly installed or cleanly removed. */
pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const
{
- if (Pkg->CurrentState == UnPacked ||
- Pkg->CurrentState == HalfConfigured)
+ if (Pkg->CurrentState == State::UnPacked ||
+ Pkg->CurrentState == State::HalfConfigured)
return NeedsConfigure;
- if (Pkg->CurrentState == UnInstalled ||
- Pkg->CurrentState == HalfInstalled ||
- Pkg->InstState != Ok)
+ if (Pkg->CurrentState == State::UnInstalled ||
+ Pkg->CurrentState == State::HalfInstalled ||
+ Pkg->InstState != State::Ok)
return NeedsUnpack;
return NeedsNothing;
@@ -217,8 +221,8 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const
conflicts. */
bool pkgCache::DepIterator::IsCritical()
{
- if (Dep->Type == Conflicts || Dep->Type == Depends ||
- Dep->Type == PreDepends)
+ if (Dep->Type == Dep::Conflicts || Dep->Type == Dep::Depends ||
+ Dep->Type == Dep::PreDepends)
return true;
return false;
}
@@ -293,7 +297,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets()
if (pkgCheckDep(TargetVer(),I.VerStr(),Dep->CompareOp) == false)
continue;
- if (Dep->Type == Conflicts && ParentPkg() == I.ParentPkg())
+ if (Dep->Type == Dep::Conflicts && ParentPkg() == I.ParentPkg())
continue;
Size++;
@@ -307,7 +311,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets()
if (pkgCheckDep(TargetVer(),I.ProvideVersion(),Dep->CompareOp) == false)
continue;
- if (Dep->Type == Conflicts && ParentPkg() == I.OwnerPkg())
+ if (Dep->Type == Dep::Conflicts && ParentPkg() == I.OwnerPkg())
continue;
Size++;