diff options
Diffstat (limited to 'apt-pkg/cdrom.cc')
-rw-r--r-- | apt-pkg/cdrom.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index ce1beb39b..4d45d38a2 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -652,7 +652,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"); } @@ -691,7 +692,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"); } @@ -767,7 +769,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"); } @@ -784,7 +787,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"); } |