- only unmount if APT::CDROM::NoMount is false
if (List.size() == 0 && SourceList.size() == 0)
{
if (List.size() == 0 && SourceList.size() == 0)
{
+ 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");
}
return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
}
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("No disc name found and no way to ask for it");
}
return _error->Error("No disc name found and no way to ask for it");
}
string::size_type Space = (*I).find(' ');
if (Space == string::npos)
{
string::size_type Space = (*I).find(' ');
if (Space == string::npos)
{
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("Internal error");
}
return _error->Error("Internal error");
}
string::size_type Space = (*I).find(' ');
if (Space == string::npos)
{
string::size_type Space = (*I).find(' ');
if (Space == string::npos)
{
+ if (_config->FindB("APT::CDROM::NoMount",false) == false)
+ UnmountCdrom(CDROM);
return _error->Error("Internal error");
}
return _error->Error("Internal error");
}
- send apt version in User-Agent
* apt-pkg/deb/debrecords.cc:
- fix SHA1Hash() return value
- 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
-- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Dec 2006 19:39:05 +0100
/* */
void CDROMMethod::Exit()
{
/* */
void CDROMMethod::Exit()
{
+ if (Mounted == true && _config->FindB("APT::CDROM::NoMount",false) == false)
UnmountCdrom(CDROM);
}
/*}}}*/
UnmountCdrom(CDROM);
}
/*}}}*/
break;
// I suppose this should prompt somehow?
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)
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 ""
msgid "Wrong CD-ROM"
msgstr ""
#, c-format
msgid "Unable to unmount the CD-ROM in %s, it may still be in use."
msgstr ""
#, c-format
msgid "Unable to unmount the CD-ROM in %s, it may still be in use."
msgstr ""
msgid "Disk not found."
msgstr ""
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 "File not found"
msgstr ""
msgid "Found %i package indexes, %i source indexes and %i signatures\n"
msgstr ""
msgid "Found %i package indexes, %i source indexes and %i signatures\n"
msgstr ""
msgid "That is not a valid name, try again.\n"
msgstr ""
msgid "That is not a valid name, try again.\n"
msgstr ""
#, c-format
msgid ""
"This disc is called: \n"
"'%s'\n"
msgstr ""
#, c-format
msgid ""
"This disc is called: \n"
"'%s'\n"
msgstr ""
msgid "Copying package lists..."
msgstr ""
msgid "Copying package lists..."
msgstr ""
msgid "Writing new source list\n"
msgstr ""
msgid "Writing new source list\n"
msgstr ""
msgid "Source list entries for this disc are:\n"
msgstr ""
msgid "Source list entries for this disc are:\n"
msgstr ""
msgid "Unmounting CD-ROM..."
msgstr ""
msgid "Unmounting CD-ROM..."
msgstr ""