]> git.saurik.com Git - apt.git/commitdiff
print from their the visit came from
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 23 Aug 2011 18:17:19 +0000 (20:17 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 23 Aug 2011 18:17:19 +0000 (20:17 +0200)
apt-pkg/orderlist.cc
apt-pkg/orderlist.h

index a58efa987469f87672e6b5e3efec82c189233743..2fc0b69278af6f0d42e9dee0cd70fdf9ee892c36 100644 (file)
@@ -152,7 +152,7 @@ bool pkgOrderList::DoRun()
    iterator OldEnd = End;
    End = NList;
    for (iterator I = List; I != OldEnd; ++I)
-      if (VisitNode(PkgIterator(Cache,*I)) == false)
+      if (VisitNode(PkgIterator(Cache,*I), "DoRun") == false)
       {
         End = OldEnd;
         return false;
@@ -519,7 +519,7 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
       if (Critical == false && IsMissing(D.ParentPkg()) == true)
         continue;
 
-      if (VisitNode(Pkg) == false)
+      if (VisitNode(Pkg, "Provides") == false)
         return false;
    }
    return true;
@@ -530,7 +530,7 @@ bool pkgOrderList::VisitProvides(DepIterator D,bool Critical)
 /* This is the core ordering routine. It calls the set dependency
    consideration functions which then potentialy call this again. Finite
    depth is achived through the colouring mechinism. */
-bool pkgOrderList::VisitNode(PkgIterator Pkg)
+bool pkgOrderList::VisitNode(PkgIterator Pkg, char const* from)
 {
    // Looping or irrelevent.
    // This should probably trancend not installed packages
@@ -541,7 +541,7 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg)
    if (Debug == true)
    {
       for (int j = 0; j != Depth; j++) clog << ' ';
-      clog << "Visit " << Pkg.FullName() << endl;
+      clog << "Visit " << Pkg.FullName() << " from " << from << endl;
    }
    
    Depth++;
@@ -636,7 +636,7 @@ bool pkgOrderList::DepUnPackCrit(DepIterator D)
         if (CheckDep(D) == true)
            continue;
 
-        if (VisitNode(D.ParentPkg()) == false)
+        if (VisitNode(D.ParentPkg(), "UnPackCrit") == false)
            return false;
       }
       else
@@ -811,7 +811,7 @@ bool pkgOrderList::DepUnPackDep(DepIterator D)
            if (IsMissing(D.ParentPkg()) == true)
               continue;
            
-           if (VisitNode(D.ParentPkg()) == false)
+           if (VisitNode(D.ParentPkg(), "UnPackDep-Parent") == false)
               return false;
         }
         else
@@ -825,7 +825,7 @@ bool pkgOrderList::DepUnPackDep(DepIterator D)
               if (CheckDep(D) == true)
                 continue;
 
-              if (VisitNode(D.TargetPkg()) == false)
+              if (VisitNode(D.TargetPkg(), "UnPackDep-Target") == false)
                 return false;
            }
         }
@@ -924,7 +924,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
                        if (IsFlag(P, InList) == true &&
                            IsFlag(P, AddPending) == false &&
                            Cache[P].InstallVer != 0 &&
-                           VisitNode(P) == true)
+                           VisitNode(P, "Remove-P") == true)
                        {
                           Flag(P, Immediate);
                           tryFixDeps = false;
@@ -960,7 +960,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
                  if (IsFlag(F.TargetPkg(), InList) == true &&
                      IsFlag(F.TargetPkg(), AddPending) == false &&
                      Cache[F.TargetPkg()].InstallVer != 0 &&
-                     VisitNode(F.TargetPkg()) == true)
+                     VisitNode(F.TargetPkg(), "Remove-Target") == true)
                  {
                     Flag(F.TargetPkg(), Immediate);
                     tryFixDeps = false;
@@ -974,7 +974,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
                        if (IsFlag(Prv.OwnerPkg(), InList) == true &&
                            IsFlag(Prv.OwnerPkg(), AddPending) == false &&
                            Cache[Prv.OwnerPkg()].InstallVer != 0 &&
-                           VisitNode(Prv.OwnerPkg()) == true)
+                           VisitNode(Prv.OwnerPkg(), "Remove-Owner") == true)
                        {
                           Flag(Prv.OwnerPkg(), Immediate);
                           tryFixDeps = false;
@@ -994,7 +994,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
         if (IsMissing(D.ParentPkg()) == true)
            continue;
         
-        if (VisitNode(D.ParentPkg()) == false)
+        if (VisitNode(D.ParentPkg(), "Remove-Parent") == false)
            return false;
       }
    
index bbceb3879a6bac2685c8769dcab683aef283d96e..264f7ba03814e7f1cf1ba92a7cfbc9d8f23fbffd 100644 (file)
@@ -18,6 +18,7 @@
 
 
 #include <apt-pkg/pkgcache.h>
+#include <apt-pkg/macros.h>
 
 class pkgDepCache;
 class pkgOrderList : protected pkgCache::Namespace
@@ -45,7 +46,8 @@ class pkgOrderList : protected pkgCache::Namespace
    bool Debug;
    
    // Main visit function
-   bool VisitNode(PkgIterator Pkg);
+   __deprecated bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); };
+   bool VisitNode(PkgIterator Pkg, char const* from);
    bool VisitDeps(DepFunc F,PkgIterator Pkg);
    bool VisitRDeps(DepFunc F,PkgIterator Pkg);
    bool VisitRProvides(DepFunc F,VerIterator Ver);