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");
}
{
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");
}
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");
}
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");
}
- send apt version in User-Agent
* apt-pkg/deb/debrecords.cc:
- fix SHA1Hash() return value
+ * apt-pkg/cdrom.cc, methods/cdrom.cc:
+ - only unmount if APT::CDROM::NoMount is false
-- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Dec 2006 19:39:05 +0100
/* */
void CDROMMethod::Exit()
{
- if (Mounted == true)
+ if (Mounted == true && _config->FindB("APT::CDROM::NoMount",false) == false)
UnmountCdrom(CDROM);
}
/*}}}*/
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)
msgid "Wrong CD-ROM"
msgstr ""
-#: methods/cdrom.cc:164
+#: methods/cdrom.cc:165
#, c-format
msgid "Unable to unmount the CD-ROM in %s, it may still be in use."
msgstr ""
-#: methods/cdrom.cc:169
+#: methods/cdrom.cc:170
msgid "Disk not found."
msgstr ""
-#: methods/cdrom.cc:177 methods/file.cc:79 methods/rsh.cc:264
+#: methods/cdrom.cc:178 methods/file.cc:79 methods/rsh.cc:264
msgid "File not found"
msgstr ""
msgid "Found %i package indexes, %i source indexes and %i signatures\n"
msgstr ""
-#: apt-pkg/cdrom.cc:710
+#: apt-pkg/cdrom.cc:712
msgid "That is not a valid name, try again.\n"
msgstr ""
-#: apt-pkg/cdrom.cc:726
+#: apt-pkg/cdrom.cc:728
#, c-format
msgid ""
"This disc is called: \n"
"'%s'\n"
msgstr ""
-#: apt-pkg/cdrom.cc:730
+#: apt-pkg/cdrom.cc:732
msgid "Copying package lists..."
msgstr ""
-#: apt-pkg/cdrom.cc:754
+#: apt-pkg/cdrom.cc:756
msgid "Writing new source list\n"
msgstr ""
-#: apt-pkg/cdrom.cc:763
+#: apt-pkg/cdrom.cc:765
msgid "Source list entries for this disc are:\n"
msgstr ""
-#: apt-pkg/cdrom.cc:803
+#: apt-pkg/cdrom.cc:807
msgid "Unmounting CD-ROM..."
msgstr ""