summaryrefslogtreecommitdiff
path: root/apt-pkg/cdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-07 12:49:33 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-07 12:49:33 +0100
commit70dbf5f8f3e6e3526c82c72ed1795d9f2dad0338 (patch)
treeb66dbe5f093cf7940593501e16e571f1f83c12ae /apt-pkg/cdrom.cc
parent25a04630d6eef123a62f50703b82cc62acf1fbfb (diff)
* apt-pkg/cdrom.cc:
- only unmount if APT::CDROM::NoMount is false * methods/cdrom.cc: - only umount if it was mounted by the method before
Diffstat (limited to 'apt-pkg/cdrom.cc')
-rw-r--r--apt-pkg/cdrom.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 241688785..4d45d38a2 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -508,10 +508,8 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
CDROM.c_str());
log->Update(msg.str());
}
-
- if (_config->FindB("APT::CDROM::NoMount",false) == false)
- if (MountCdrom(CDROM) == false)
- return _error->Error("Failed to mount the cdrom.");
+ if (MountCdrom(CDROM) == false)
+ return _error->Error("Failed to mount the cdrom.");
// Hash the CD to get an ID
if(log)
@@ -805,8 +803,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
// Unmount and finish
- if (_config->FindB("APT::CDROM::NoMount",false) == false &&
- _config->FindB("APT::CDROM::UnMountOnFinish",true) == true) {
+ if (_config->FindB("APT::CDROM::NoMount",false) == false) {
log->Update(_("Unmounting CD-ROM..."), STEP_LAST);
UnmountCdrom(CDROM);
}