Browse Source

A bit better install ordering w/cds

Author: jgg
Date: 1999-07-12 03:40:37 GMT
A bit better install ordering w/cds
tags/debian/0.7.21
Arch Librarian 17 years ago
parent
commit
3fb5f4e474
2 changed files with 21 additions and 9 deletions
  1. +19
    -7
      apt-pkg/orderlist.cc
  2. +2
    -2
      apt-pkg/orderlist.h

+ 19
- 7
apt-pkg/orderlist.cc View File

@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: orderlist.cc,v 1.5 1999/07/04 23:22:53 jgg Exp $
// $Id: orderlist.cc,v 1.6 1999/07/12 03:40:37 jgg Exp $
/* ######################################################################

Order List - Represents and Manipulates an ordered list of packages.
@@ -421,7 +421,7 @@ bool pkgOrderList::VisitRProvides(DepFunc F,VerIterator Ver)
// OrderList::VisitProvides - Visit all of the providing packages /*{{{*/
// ---------------------------------------------------------------------
/* This routine calls visit on all providing packages. */
bool pkgOrderList::VisitProvides(DepIterator D)
bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
{
Version **List = D.AllTargets();
for (Version **I = List; *I != 0; I++)
@@ -438,6 +438,10 @@ bool pkgOrderList::VisitProvides(DepIterator D)
if (D->Type == pkgCache::Dep::Conflicts && (Version *)Pkg.CurrentVer() != *I)
continue;
// Skip over missing files
if (IsMissing(D.ParentPkg()) == true)
continue;
if (VisitNode(Pkg) == false)
{
delete [] List;
@@ -586,7 +590,7 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D)
bool Res = false;
if (D->Type == pkgCache::Dep::PreDepends)
Primary = &DepUnPackPreD;
Res = VisitProvides(D);
Res = VisitProvides(D,true);
Primary = Old;
if (Res == false)
return false;
@@ -632,7 +636,7 @@ bool pkgOrderList::DepUnPackPreD(DepIterator D)
continue;
}
if (VisitProvides(D) == false)
if (VisitProvides(D,true) == false)
return false;
}
return true;
@@ -685,7 +689,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D)
continue;
}
if (VisitProvides(D) == false)
if (VisitProvides(D,true) == false)
return false;
}
return true;
@@ -721,12 +725,16 @@ bool pkgOrderList::DepUnPackDep(DepIterator D)
if (CheckDep(D) == true)
continue;
// Skip over missing files
if (IsMissing(D.ParentPkg()) == true)
continue;
if (VisitNode(D.ParentPkg()) == false)
return false;
}
else
if (D->Type == pkgCache::Dep::Depends)
if (VisitProvides(D) == false)
if (VisitProvides(D,false) == false)
return false;
}
return true;
@@ -747,7 +755,7 @@ bool pkgOrderList::DepConfigure(DepIterator D)
for (; D.end() == false; D++)
if (D->Type == pkgCache::Dep::Depends)
if (VisitProvides(D) == false)
if (VisitProvides(D,false) == false)
return false;
return true;
}
@@ -792,6 +800,10 @@ bool pkgOrderList::DepRemove(DepIterator D)
continue;
}

// Skip over missing files
if (IsMissing(D.ParentPkg()) == true)
continue;
if (VisitNode(D.ParentPkg()) == false)
return false;
}


+ 2
- 2
apt-pkg/orderlist.h View File

@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: orderlist.h,v 1.4 1999/07/04 23:22:53 jgg Exp $
// $Id: orderlist.h,v 1.5 1999/07/12 03:40:38 jgg Exp $
/* ######################################################################

Order List - Represents and Manipulates an ordered list of packages.
@@ -59,7 +59,7 @@ class pkgOrderList
bool VisitDeps(DepFunc F,PkgIterator Pkg);
bool VisitRDeps(DepFunc F,PkgIterator Pkg);
bool VisitRProvides(DepFunc F,VerIterator Ver);
bool VisitProvides(DepIterator Pkg);
bool VisitProvides(DepIterator Pkg,bool Critical);
// Dependency checking functions.
bool DepUnPackCrit(DepIterator D);


Loading…
Cancel
Save