summaryrefslogtreecommitdiff
path: root/apt-pkg/cdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-07 13:00:35 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-07 13:00:35 +0100
commite29dfa9ebfe9940089697fbb3e436e8ff95ecad6 (patch)
treeb8adbb7dc2d9927c94cc95911f1bb745739814fc /apt-pkg/cdrom.cc
parent07cf8a2fd6b6472ea8d98573c18b010ef8b66ed4 (diff)
parent70dbf5f8f3e6e3526c82c72ed1795d9f2dad0338 (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.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index b42c82dd0..aefe9c9e9 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -679,7 +679,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
if (List.size() == 0 && SourceList.size() == 0)
{
- UnmountCdrom(CDROM);
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
}
@@ -718,7 +719,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
{
if(!log)
{
- UnmountCdrom(CDROM);
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("No disc name found and no way to ask for it");
}
@@ -796,7 +798,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
string::size_type Space = (*I).find(' ');
if (Space == string::npos)
{
- UnmountCdrom(CDROM);
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("Internal error");
}
@@ -813,7 +816,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
string::size_type Space = (*I).find(' ');
if (Space == string::npos)
{
- UnmountCdrom(CDROM);
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("Internal error");
}