summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cdrom.cc9
-rw-r--r--apt-pkg/contrib/cdromutl.h3
2 files changed, 5 insertions, 7 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);
}
diff --git a/apt-pkg/contrib/cdromutl.h b/apt-pkg/contrib/cdromutl.h
index 3180a03c7..db140ec02 100644
--- a/apt-pkg/contrib/cdromutl.h
+++ b/apt-pkg/contrib/cdromutl.h
@@ -8,7 +8,7 @@
##################################################################### */
/*}}}*/
#ifndef PKGLIB_CDROMUTL_H
-#define PKGLIB_ACQUIRE_METHOD_H
+#define PKGLIB_CDROMUTL_H
#include <string>
@@ -21,5 +21,6 @@ using std::string;
bool MountCdrom(string Path);
bool UnmountCdrom(string Path);
bool IdentCdrom(string CD,string &Res,unsigned int Version = 2);
+bool IsMounted(string &Path);
#endif