]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/depcache.cc
show in madison command again also source packages (LP: #614589)
[apt.git] / apt-pkg / depcache.cc
index bc663a8e954cfe811fea2efb92e1325b65719789..00bf68af11aa784197e7f87bfed23608bfa8b19e 100644 (file)
@@ -227,7 +227,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)      /*{{{*/
    // if it does not exist, create a empty one
    if(!FileExists(state)) 
    {
-      StateFile.Open(state, FileFd::WriteEmpty);
+      StateFile.Open(state, FileFd::WriteAtomic);
       StateFile.Close();
    }
 
@@ -1425,10 +1425,13 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
            VerIterator Ver(*this,*I);
            PkgIterator Pkg = Ver.ParentPkg();
 
-           if (Start->Type != Dep::DpkgBreaks)
-              MarkDelete(Pkg,false,Depth + 1, false);
-           else if (PkgState[Pkg->ID].CandidateVer != *I)
+           
+              
+           if (PkgState[Pkg->ID].CandidateVer != *I &&
+               Start->Type == Dep::DpkgBreaks)
               MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps);
+           else
+              MarkDelete(Pkg,false,Depth + 1, false);
         }
         continue;
       }