#include <apti18n.h>
/*}}}*/
+static const char *W_NO_CDROM_FOUND = \
+ N_("No CD-ROM could be auto-detected or found using "
+ "the default mount path.\n"
+ "You may try the --cdrom option to set the CD-ROM mount path. "
+ "See 'man apt-cdrom' for more "
+ "information about the CD-ROM auto-detection and mount path.");
using namespace std;
return true;
}
/*}}}*/
-
// DoAdd - Add a new CDROM /*{{{*/
// ---------------------------------------------------------------------
/* This does the main add bit.. We show some status and things. The
if (AutoDetect && UdevCdroms.Dlopen())
while (AutoDetectCdrom(UdevCdroms, count))
res &= cdrom.Add(&log);
- if (count == 0)
+ if (count == 0) {
res = cdrom.Add(&log);
+ if (res == false) {
+ _error->Warning(_(W_NO_CDROM_FOUND));
+ }
+ }
if(res)
cout << _("Repeat this process for the rest of the CDs in your set.") << endl;
if (AutoDetect && UdevCdroms.Dlopen())
while (AutoDetectCdrom(UdevCdroms, count))
res &= cdrom.Ident(ident, &log);
- if (count == 0)
- return cdrom.Ident(ident, &log);
+ if (count == 0) {
+ res = cdrom.Ident(ident, &log);
+ if (res == false) {
+ _error->Warning(_(W_NO_CDROM_FOUND));
+ }
+ }
return res;
}
/*}}}*/
" -m No mounting\n"
" -f Fast mode, don't check package files\n"
" -a Thorough scan mode\n"
- " --auto-detect Auto detect drive and mount point\n"
+ " --no-auto-detect Do not try to auto detect drive and mount point\n"
" -c=? Read this configuration file\n"
" -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
"See fstab(5)\n";
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
- { 0,"auto-detect","Acquire::cdrom::AutoDetect",0},
+ { 0,"auto-detect","Acquire::cdrom::AutoDetect", CommandLine::Boolean},
{'v',"version","version",0},
{'d',"cdrom","Acquire::cdrom::mount",CommandLine::HasArg},
{'r',"rename","APT::CDROM::Rename",0},