From 509598772f0df89ea5e783a636fb941b1fc6675c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 7 Mar 2007 10:04:31 +0100 Subject: * apt-pkg/cdrom.cc, methods/cdrom.cc: - only unmount if APT::CDROM::NoMount is false --- methods/cdrom.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'methods/cdrom.cc') diff --git a/methods/cdrom.cc b/methods/cdrom.cc index d6b8eae75..d662b7129 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -57,7 +57,7 @@ CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly | /* */ void CDROMMethod::Exit() { - if (Mounted == true) + if (Mounted == true && _config->FindB("APT::CDROM::NoMount",false) == false) UnmountCdrom(CDROM); } /*}}}*/ @@ -160,7 +160,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm) break; // I suppose this should prompt somehow? - if (UnmountCdrom(CDROM) == false) + if (_config->FindB("APT::CDROM::NoMount",false) == false && + UnmountCdrom(CDROM) == false) return _error->Error(_("Unable to unmount the CD-ROM in %s, it may still be in use."), CDROM.c_str()); if (MediaFail(Get.Host,CDROM) == false) -- cgit v1.2.3-70-g09d2