/* ######################################################################
APT CDROM - Tool for handling APT's CDROM database.
/* ######################################################################
APT CDROM - Tool for handling APT's CDROM database.
search that short circuits when it his a package file in the dir.
This speeds it up greatly as the majority of the size is in the
binary-* sub dirs. */
search that short circuits when it his a package file in the dir.
This speeds it up greatly as the majority of the size is in the
binary-* sub dirs. */
- if (stat("Packages",&Buf) == 0 ||
- stat("Packages.gz",&Buf) == 0)
+ if (stat("Packages",&Buf) == 0)
- if (stat(List[I].c_str(),&Buf) != 0)
- _error->Errno("stat","Failed to stat %s",List[I].c_str());
+ if (stat((List[I] + "Packages").c_str(),&Buf) != 0)
+ _error->Errno("stat","Failed to stat %sPackages",List[I].c_str());
Name.find('/') == string::npos)
break;
cout << "That is not a valid name, try again " << endl;
Name.find('/') == string::npos)
break;
cout << "That is not a valid name, try again " << endl;
Database.Set("CD::" + ID,Name);
cout << "This Disc is called '" << Name << "'" << endl;
Database.Set("CD::" + ID,Name);
cout << "This Disc is called '" << Name << "'" << endl;
for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
{
string::size_type Space = (*I).find(' ');
for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
{
string::size_type Space = (*I).find(' ');
cout << " -r Rename a recognized CD-ROM" << endl;
cout << " -m No mounting" << endl;
cout << " -f Fast mode, don't check package files" << endl;
cout << " -r Rename a recognized CD-ROM" << endl;
cout << " -m No mounting" << endl;
cout << " -f Fast mode, don't check package files" << endl;
cout << " -c=? Read this configuration file" << endl;
cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl;
cout << "See fstab(5)" << endl;
cout << " -c=? Read this configuration file" << endl;
cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl;
cout << "See fstab(5)" << endl;
{'r',"rename","APT::CDROM::Rename",0},
{'m',"no-mount","APT::CDROM::NoMount",0},
{'f',"fast","APT::CDROM::Fast",0},
{'r',"rename","APT::CDROM::Rename",0},
{'m',"no-mount","APT::CDROM::NoMount",0},
{'f',"fast","APT::CDROM::Fast",0},
- {'n',"just-print","APT::CDROM::NoAct",0},
+ {'n',"just-print","APT::CDROM::NoAct",0},
{'n',"recon","APT::CDROM::NoAct",0},
{'n',"recon","APT::CDROM::NoAct",0},
- {'n',"no-act","APT::CDROM::NoAct",0},
+ {'n',"no-act","APT::CDROM::NoAct",0},
+ {'a',"thorough","APT::CDROM::Thorough",0},
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
{0,0,0,0}};
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
{0,0,0,0}};