summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-24 16:34:12 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-24 16:34:12 +0200
commit7c122f33c4bf8caec1cf8b250d512b65c3c574ca (patch)
tree81786b34b546c76a27027df3a671bf35ef1aa15e /apt-pkg/depcache.cc
parent99016ee630714bf906b1f58f6a898226bce0bb03 (diff)
parent662603c40b8b38e487f76e7aceb773c935203cea (diff)
merged from debian-experimental-ma0.8.0
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index bc663a8e9..00bf68af1 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -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;
}