summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cdrom.cc9
-rw-r--r--debian/changelog5
-rw-r--r--methods/cdrom.cc3
-rw-r--r--po/apt-all.pot40
4 files changed, 31 insertions, 26 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 4d45d38a2..241688785 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -508,8 +508,10 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
CDROM.c_str());
log->Update(msg.str());
}
- if (MountCdrom(CDROM) == false)
- return _error->Error("Failed to mount the cdrom.");
+
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ if (MountCdrom(CDROM) == false)
+ return _error->Error("Failed to mount the cdrom.");
// Hash the CD to get an ID
if(log)
@@ -803,7 +805,8 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
// Unmount and finish
- if (_config->FindB("APT::CDROM::NoMount",false) == false) {
+ if (_config->FindB("APT::CDROM::NoMount",false) == false &&
+ _config->FindB("APT::CDROM::UnMountOnFinish",true) == true) {
log->Update(_("Unmounting CD-ROM..."), STEP_LAST);
UnmountCdrom(CDROM);
}
diff --git a/debian/changelog b/debian/changelog
index 2280c9fae..49c324545 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,9 +11,10 @@ apt (0.6.46.5) UNRELEASED; urgency=low
* apt-pkg/deb/debrecords.cc:
- fix SHA1Hash() return value
* apt-pkg/cdrom.cc, methods/cdrom.cc:
- - only unmount if APT::CDROM::NoMount is false
+ - added APT::CDROM::UnMountOnFinish to have more control over
+ the umount/mount process
- -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Dec 2006 19:39:05 +0100
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 7 Mar 2007 12:03:50 +0100
apt (0.6.46.4) unstable; urgency=high
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index d662b7129..556d2c1a6 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -57,7 +57,8 @@ CDROMMethod::CDROMMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly |
/* */
void CDROMMethod::Exit()
{
- if (Mounted == true && _config->FindB("APT::CDROM::NoMount",false) == false)
+ if (Mounted == true &&
+ _config->FindB("APT::CDROM::UnMountOnFinish",true) == true)
UnmountCdrom(CDROM);
}
/*}}}*/
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 963f58a30..981b0465a 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -1462,31 +1462,31 @@ msgstr ""
msgid "Unparsable control file"
msgstr ""
-#: methods/cdrom.cc:114
+#: methods/cdrom.cc:115
#, c-format
msgid "Unable to read the cdrom database %s"
msgstr ""
-#: methods/cdrom.cc:123
+#: methods/cdrom.cc:124
msgid ""
"Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update "
"cannot be used to add new CD-ROMs"
msgstr ""
-#: methods/cdrom.cc:131
+#: methods/cdrom.cc:132
msgid "Wrong CD-ROM"
msgstr ""
-#: methods/cdrom.cc:165
+#: methods/cdrom.cc:166
#, c-format
msgid "Unable to unmount the CD-ROM in %s, it may still be in use."
msgstr ""
-#: methods/cdrom.cc:170
+#: methods/cdrom.cc:171
msgid "Disk not found."
msgstr ""
-#: methods/cdrom.cc:178 methods/file.cc:79 methods/rsh.cc:264
+#: methods/cdrom.cc:179 methods/file.cc:79 methods/rsh.cc:264
msgid "File not found"
msgstr ""
@@ -2405,66 +2405,66 @@ msgid ""
"Mounting CD-ROM\n"
msgstr ""
-#: apt-pkg/cdrom.cc:516 apt-pkg/cdrom.cc:598
+#: apt-pkg/cdrom.cc:518 apt-pkg/cdrom.cc:600
msgid "Identifying.. "
msgstr ""
-#: apt-pkg/cdrom.cc:541
+#: apt-pkg/cdrom.cc:543
#, c-format
msgid "Stored label: %s \n"
msgstr ""
-#: apt-pkg/cdrom.cc:561
+#: apt-pkg/cdrom.cc:563
#, c-format
msgid "Using CD-ROM mount point %s\n"
msgstr ""
-#: apt-pkg/cdrom.cc:579
+#: apt-pkg/cdrom.cc:581
msgid "Unmounting CD-ROM\n"
msgstr ""
-#: apt-pkg/cdrom.cc:583
+#: apt-pkg/cdrom.cc:585
msgid "Waiting for disc...\n"
msgstr ""
#. Mount the new CDROM
-#: apt-pkg/cdrom.cc:591
+#: apt-pkg/cdrom.cc:593
msgid "Mounting CD-ROM...\n"
msgstr ""
-#: apt-pkg/cdrom.cc:609
+#: apt-pkg/cdrom.cc:611
msgid "Scanning disc for index files..\n"
msgstr ""
-#: apt-pkg/cdrom.cc:647
+#: apt-pkg/cdrom.cc:649
#, c-format
msgid "Found %i package indexes, %i source indexes and %i signatures\n"
msgstr ""
-#: apt-pkg/cdrom.cc:712
+#: apt-pkg/cdrom.cc:714
msgid "That is not a valid name, try again.\n"
msgstr ""
-#: apt-pkg/cdrom.cc:728
+#: apt-pkg/cdrom.cc:730
#, c-format
msgid ""
"This disc is called: \n"
"'%s'\n"
msgstr ""
-#: apt-pkg/cdrom.cc:732
+#: apt-pkg/cdrom.cc:734
msgid "Copying package lists..."
msgstr ""
-#: apt-pkg/cdrom.cc:756
+#: apt-pkg/cdrom.cc:758
msgid "Writing new source list\n"
msgstr ""
-#: apt-pkg/cdrom.cc:765
+#: apt-pkg/cdrom.cc:767
msgid "Source list entries for this disc are:\n"
msgstr ""
-#: apt-pkg/cdrom.cc:807
+#: apt-pkg/cdrom.cc:810
msgid "Unmounting CD-ROM..."
msgstr ""