summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-07 10:04:31 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-07 10:04:31 +0100
commit509598772f0df89ea5e783a636fb941b1fc6675c (patch)
tree8dda684bcb8c462125a01bb34ec94734767a6a1a /methods
parent020daa7b026cf1496959ccc9d062d95cb5f8ec02 (diff)
* apt-pkg/cdrom.cc, methods/cdrom.cc:
- only unmount if APT::CDROM::NoMount is false
Diffstat (limited to 'methods')
-rw-r--r--methods/cdrom.cc5
1 files changed, 3 insertions, 2 deletions
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)