]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
add options to disable specific checksums for Indexes
[apt.git] / apt-pkg / depcache.cc
index d2557386dc38db990148e9f9c56f22b9480bd145..ddbd3769905bd69931b1e177a2f62a8e2617c1df 100644 (file)
@@ -339,7 +339,7 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res)
    /* Check simple depends. A depends -should- never self match but 
       we allow it anyhow because dpkg does. Technically it is a packaging
       bug. Conflicts may never self match */
-   if (Dep.TargetPkg()->Group != Dep.ParentPkg()->Group ||
+   if (Dep.TargetPkg() != Dep.ParentPkg() ||
        (Dep->Type != Dep::Conflicts && Dep->Type != Dep::DpkgBreaks && Dep->Type != Dep::Obsoletes))
    {
       PkgIterator Pkg = Dep.TargetPkg();
@@ -1257,9 +1257,10 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
 
    if(FromUser)
      {
-       // Set it to manual if it's a new install or cancelling the
-       // removal of a garbage package.
-       if(P.Status == 2 || (!Pkg.CurrentVer().end() && !P.Marked))
+       // Set it to manual if it's a new install or already installed,
+       // but only if its not marked by the autoremover (aptitude depend on this behavior)
+       // or if we do automatic installation (aptitude never does it)
+       if(P.Status == 2 || (Pkg->CurrentVer != 0 && (AutoInst == true || P.Marked == false)))
         P.Flags &= ~Flag::Auto;
      }
    else
@@ -1330,8 +1331,6 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
           for (DepIterator D = instVer.DependsList(); D.end() != true; D++)
             {
               //FIXME: deal better with or-groups(?)
-              DepIterator LocalStart = D;
-
               if(IsImportantDep(D) && !D.IsCritical() &&
                  Start.TargetPkg() == D.TargetPkg())
                 {
@@ -1921,10 +1920,11 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
       return;
 
    VerIterator const currver = pkg.CurrentVer();
-   VerIterator const candver = state.CandidateVerIter(*this);
    VerIterator const instver = state.InstVerIter(*this);
 
 #if 0
+   VerIterator const candver = state.CandidateVerIter(*this);
+
    // If a package was garbage-collected but is now being marked, we
    // should re-select it 
    // For cases when a pkg is set to upgrade and this trigger the