summaryrefslogtreecommitdiff
path: root/apt-pkg/cdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-02 08:32:34 +0200
committerMichael Vogt <mvo@debian.org>2013-07-02 08:32:34 +0200
commit8e4c3f0a42664b8c37cc2e0de285849fbf118e11 (patch)
tree059b76fef1c1636a7e1ad16e5a4ce06304271718 /apt-pkg/cdrom.cc
parent25a4d2049fb79bc2c86cd45e977b4a071e5300ac (diff)
parente3c62328abbd548bb0da42fdbad954b3ce4f7102 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Conflicts: debian/changelog
Diffstat (limited to 'apt-pkg/cdrom.cc')
-rw-r--r--apt-pkg/cdrom.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 9a9a854bf..a5668a50a 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -829,6 +829,14 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/
log->Update(msg.str());
log->Update(_("Copying package lists..."), STEP_COPY);
}
+
+ // check for existence and possibly create state directory for copying
+ string const listDir = _config->FindDir("Dir::State::lists");
+ string const partialListDir = listDir + "partial/";
+ if (CreateAPTDirectoryIfNeeded(_config->FindDir("Dir::State"), partialListDir) == false &&
+ CreateAPTDirectoryIfNeeded(listDir, partialListDir) == false)
+ return _error->Errno("cdrom", _("List directory %spartial is missing."), listDir.c_str());
+
// take care of the signatures and copy them if they are ok
// (we do this before PackageCopy as it modifies "List" and "SourceList")
SigVerify SignVerify;