diff options
-rw-r--r-- | apt-pkg/indexcopy.cc | 7 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 0abbf63de..3156778d4 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -132,9 +132,14 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, (*I).c_str() + CDROM.length(),GetFileName()); string TargetF = _config->FindDir("Dir::State::lists") + "partial/"; TargetF += URItoFileName(S); + FileFd Target; if (_config->FindB("APT::CDROM::NoAct",false) == true) + { TargetF = "/dev/null"; - FileFd Target(TargetF,FileFd::WriteAtomic); + Target.Open(TargetF,FileFd::WriteExists); + } else { + Target.Open(TargetF,FileFd::WriteAtomic); + } FILE *TargetFl = fdopen(dup(Target.Fd()),"w"); if (_error->PendingError() == true) return false; diff --git a/debian/changelog b/debian/changelog index c81026041..3cdeb593f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ apt (0.8.2) unstable; urgency=low * apt-pkg/indexcopy.cc: - only use trusted.gpg.d directory if it exists + - do not replace /dev/null when running in APT::CDROM::NoAct + mode (LP: #612666), thanks to Colin Watson -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 03 Sep 2010 20:21:43 +0200 |