Apply apt-0.5.15lorg2-apt-cdrom-to-media.patch
Added in commit c34d193
:
0.5.15lorg2-alt43
- use apt-cdrom for general distribution media
- stricted verify-elf removed
This commit is contained in:
parent
fecd3f817b
commit
f70d38a336
@ -1,177 +0,0 @@
|
|||||||
diff --git a/apt/cmdline/apt-cdrom.cc b/apt/cmdline/apt-cdrom.cc
|
|
||||||
index 0a993ca..1d1f253 100644
|
|
||||||
--- a/apt/cmdline/apt-cdrom.cc
|
|
||||||
+++ b/apt/cmdline/apt-cdrom.cc
|
|
||||||
@@ -568,7 +568,7 @@ bool DoAdd(CommandLine &)
|
|
||||||
if (CDROM[0] == '.')
|
|
||||||
CDROM= SafeGetCWD() + '/' + CDROM;
|
|
||||||
|
|
||||||
- cout << _("Using CD-ROM mount point ") << CDROM << endl;
|
|
||||||
+ cout << _("Using Media mount point ") << CDROM << endl;
|
|
||||||
|
|
||||||
// Read the database
|
|
||||||
Configuration Database;
|
|
||||||
@@ -593,14 +593,14 @@ bool DoAdd(CommandLine &)
|
|
||||||
if (PreFetch == false && _config->FindB("APT::CDROM::NoMount",false) == false)
|
|
||||||
{
|
|
||||||
Mounted = true;
|
|
||||||
- cout << _("Unmounting CD-ROM") << endl;
|
|
||||||
+ cout << _("Unmounting Media") << endl;
|
|
||||||
UnmountCdrom(CDROM);
|
|
||||||
|
|
||||||
// Mount the new CDROM
|
|
||||||
- Prompt(_("Please insert a Disc in the drive and press enter"));
|
|
||||||
- cout << _("Mounting CD-ROM") << endl;
|
|
||||||
+ Prompt(_("Please insert a Media and press enter"));
|
|
||||||
+ cout << _("Mounting Media") << endl;
|
|
||||||
if (MountCdrom(CDROM) == false)
|
|
||||||
- return _error->Error(_("Failed to mount the cdrom."));
|
|
||||||
+ return _error->Error(_("Failed to mount the Media."));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash the CD to get an ID
|
|
||||||
@@ -624,7 +624,7 @@ bool DoAdd(CommandLine &)
|
|
||||||
|
|
||||||
cout << '[' << ID << ']' << endl;
|
|
||||||
|
|
||||||
- cout << _("Scanning Disc for index files.. ") << flush;
|
|
||||||
+ cout << _("Scanning Media for index files.. ") << flush;
|
|
||||||
// Get the CD structure
|
|
||||||
vector<string> List;
|
|
||||||
vector<string> sList;
|
|
||||||
@@ -700,7 +700,7 @@ bool DoAdd(CommandLine &)
|
|
||||||
Name.empty() == true)
|
|
||||||
{
|
|
||||||
// CNC:2003-11-25
|
|
||||||
- cout << _("Please provide a name for this Disc, such as 'Distribution Disk 1'");
|
|
||||||
+ cout << _("Please provide a name for this Media, such as 'Distribution Disk 1'");
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
Name = PromptLine("");
|
|
||||||
@@ -723,7 +723,7 @@ bool DoAdd(CommandLine &)
|
|
||||||
*J = '_';
|
|
||||||
|
|
||||||
Database.Set("CD::" + ID,Name);
|
|
||||||
- cout << _("This Disc is called:") << endl << " '" << Name << "'" << endl;
|
|
||||||
+ cout << _("This Media is called:") << endl << " '" << Name << "'" << endl;
|
|
||||||
|
|
||||||
// Copy the package files to the state directory
|
|
||||||
// CNC:2002-07-11
|
|
||||||
@@ -756,7 +756,7 @@ bool DoAdd(CommandLine &)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Print the sourcelist entries
|
|
||||||
- cout << _("Source List entries for this Disc are:") << endl;
|
|
||||||
+ cout << _("Source List entries for this Media are:") << endl;
|
|
||||||
for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
|
|
||||||
{
|
|
||||||
string::size_type Space = (*I).find(' ');
|
|
||||||
@@ -789,7 +789,7 @@ bool DoAdd(CommandLine &)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
- cout << _("Repeat this process for the rest of the CDs in your set.") << endl;
|
|
||||||
+ cout << _("Repeat this process for the rest of the Media in your set.") << endl;
|
|
||||||
|
|
||||||
// Unmount and finish
|
|
||||||
// CNC:2002-10-29
|
|
||||||
@@ -809,8 +809,8 @@ bool DoIdent(CommandLine &)
|
|
||||||
if (CDROM[0] == '.')
|
|
||||||
CDROM= SafeGetCWD() + '/' + CDROM;
|
|
||||||
|
|
||||||
- cout << _("Using CD-ROM mount point ") << CDROM << endl;
|
|
||||||
- cout << _("Mounting CD-ROM") << endl;
|
|
||||||
+ cout << _("Using Media mount point ") << CDROM << endl;
|
|
||||||
+ cout << _("Mounting Media") << endl;
|
|
||||||
if (MountCdrom(CDROM) == false)
|
|
||||||
return _error->Error(_("Failed to mount the cdrom."));
|
|
||||||
|
|
||||||
@@ -852,18 +852,18 @@ int ShowHelp()
|
|
||||||
cout <<
|
|
||||||
_("Usage: apt-cdrom [options] command\n"
|
|
||||||
"\n"
|
|
||||||
- "apt-cdrom is a tool to add CDROM's to APT's source list. The\n"
|
|
||||||
- "CDROM mount point and device information is taken from apt.conf\n"
|
|
||||||
+ "apt-cdrom is a tool to add Media to APT's source list. The\n"
|
|
||||||
+ "mount point and device information is taken from apt.conf\n"
|
|
||||||
"and /etc/fstab.\n"
|
|
||||||
"\n"
|
|
||||||
"Commands:\n"
|
|
||||||
- " add - Add a CDROM\n"
|
|
||||||
- " ident - Report the identity of a CDROM\n"
|
|
||||||
+ " add - Add a Media\n"
|
|
||||||
+ " ident - Report the identity of a Media\n"
|
|
||||||
"\n"
|
|
||||||
"Options:\n"
|
|
||||||
" -h This help text\n"
|
|
||||||
- " -d CD-ROM mount point\n"
|
|
||||||
- " -r Rename a recognized CD-ROM\n"
|
|
||||||
+ " -d Media mount point\n"
|
|
||||||
+ " -r Rename a recognized Media\n"
|
|
||||||
" -m No mounting\n"
|
|
||||||
" -f Fast mode, don't check package files\n"
|
|
||||||
" -a Thorough scan mode\n"
|
|
||||||
diff --git a/apt/cmdline/acqprogress.cc b/apt/cmdline/acqprogress.cc
|
|
||||||
index 5a6198d..9b957d9 100644
|
|
||||||
--- a/apt/cmdline/acqprogress.cc
|
|
||||||
+++ b/apt/cmdline/acqprogress.cc
|
|
||||||
@@ -270,9 +270,9 @@ bool AcqTextStatus::MediaChange(string Media,string Drive)
|
|
||||||
{
|
|
||||||
if (Quiet <= 0)
|
|
||||||
cout << '\r' << BlankLine << '\r';
|
|
||||||
- ioprintf(cout,_("Media Change: Please insert the disc labeled\n"
|
|
||||||
+ ioprintf(cout,_("Media Change: Please insert the media labeled\n"
|
|
||||||
" '%s'\n"
|
|
||||||
- "in the drive '%s' and press enter\n"),
|
|
||||||
+ "and press enter\n"),
|
|
||||||
Media.c_str(),Drive.c_str());
|
|
||||||
|
|
||||||
char C = 0;
|
|
||||||
diff --git a/apt/methods/cdrom.cc b/apt/methods/cdrom.cc
|
|
||||||
index 682f945..b9a068d 100644
|
|
||||||
--- a/apt/methods/cdrom.cc
|
|
||||||
+++ b/apt/methods/cdrom.cc
|
|
||||||
@@ -78,7 +78,7 @@ string CDROMMethod::PreferredURI()
|
|
||||||
if (FileExists(DFile) == true)
|
|
||||||
{
|
|
||||||
if (ReadConfigFile(Database,DFile) == false) {
|
|
||||||
- _error->Error(_("Unable to read the cdrom database %s"),
|
|
||||||
+ _error->Error(_("Unable to read the media database %s"),
|
|
||||||
DFile.c_str());
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
@@ -190,7 +190,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
|
|
||||||
if (FileExists(DFile) == true)
|
|
||||||
{
|
|
||||||
if (ReadConfigFile(Database,DFile) == false)
|
|
||||||
- return _error->Error(_("Unable to read the cdrom database %s"),
|
|
||||||
+ return _error->Error(_("Unable to read the media database %s"),
|
|
||||||
DFile.c_str());
|
|
||||||
}
|
|
||||||
DatabaseLoaded = true;
|
|
||||||
@@ -199,8 +199,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
|
|
||||||
// All non IMS queries for package files fail.
|
|
||||||
if (Itm->IndexFile == true || GetID(Get.Host).empty() == true)
|
|
||||||
{
|
|
||||||
- Fail(_("Please use apt-cdrom to make this CD recognized by APT."
|
|
||||||
- " apt-get update cannot be used to add new CDs"));
|
|
||||||
+ Fail(_("Please use apt-cdrom to make this media recognized by APT."
|
|
||||||
+ " apt-get update cannot be used to add new Media"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -240,12 +240,12 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
|
|
||||||
|
|
||||||
// I suppose this should prompt somehow?
|
|
||||||
if (UnmountCdrom(CDROM) == false)
|
|
||||||
- return _error->Error(_("Unable to unmount the CD-ROM in %s, it may still be in use."),
|
|
||||||
+ return _error->Error(_("Unable to unmount media in %s, it may still be in use."),
|
|
||||||
CDROM.c_str());
|
|
||||||
if (MediaFail(Get.Host,CDROM) == false)
|
|
||||||
{
|
|
||||||
CurrentID = "FAIL";
|
|
||||||
- Fail(_("Wrong CD"),true);
|
|
||||||
+ Fail(_("Wrong media"),true);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -271,9 +271,9 @@ bool AcqTextStatus::MediaChange(string Media,string Drive)
|
|||||||
{
|
{
|
||||||
if (Quiet <= 0)
|
if (Quiet <= 0)
|
||||||
cout << '\r' << BlankLine << '\r';
|
cout << '\r' << BlankLine << '\r';
|
||||||
ioprintf(cout,_("Media Change: Please insert the disc labeled\n"
|
ioprintf(cout,_("Media Change: Please insert the media labeled\n"
|
||||||
" '%s'\n"
|
" '%s'\n"
|
||||||
"in the drive '%s' and press enter\n"),
|
"and press enter\n"),
|
||||||
Media.c_str(),Drive.c_str());
|
Media.c_str(),Drive.c_str());
|
||||||
if (_config->FindB("simple-output"))
|
if (_config->FindB("simple-output"))
|
||||||
cout << "apt-get:media-change:" << Drive << ":" << Media << std::endl;
|
cout << "apt-get:media-change:" << Drive << ":" << Media << std::endl;
|
||||||
|
@ -568,7 +568,7 @@ bool DoAdd(CommandLine &)
|
|||||||
if (CDROM[0] == '.')
|
if (CDROM[0] == '.')
|
||||||
CDROM= SafeGetCWD() + '/' + CDROM;
|
CDROM= SafeGetCWD() + '/' + CDROM;
|
||||||
|
|
||||||
cout << _("Using CD-ROM mount point ") << CDROM << endl;
|
cout << _("Using Media mount point ") << CDROM << endl;
|
||||||
|
|
||||||
// Read the database
|
// Read the database
|
||||||
Configuration Database;
|
Configuration Database;
|
||||||
@ -593,14 +593,14 @@ bool DoAdd(CommandLine &)
|
|||||||
if (PreFetch == false && _config->FindB("APT::CDROM::NoMount",false) == false)
|
if (PreFetch == false && _config->FindB("APT::CDROM::NoMount",false) == false)
|
||||||
{
|
{
|
||||||
Mounted = true;
|
Mounted = true;
|
||||||
cout << _("Unmounting CD-ROM") << endl;
|
cout << _("Unmounting Media") << endl;
|
||||||
UnmountCdrom(CDROM);
|
UnmountCdrom(CDROM);
|
||||||
|
|
||||||
// Mount the new CDROM
|
// Mount the new CDROM
|
||||||
Prompt(_("Please insert a Disc in the drive and press enter"));
|
Prompt(_("Please insert a Media and press enter"));
|
||||||
cout << _("Mounting CD-ROM") << endl;
|
cout << _("Mounting Media") << endl;
|
||||||
if (MountCdrom(CDROM) == false)
|
if (MountCdrom(CDROM) == false)
|
||||||
return _error->Error(_("Failed to mount the cdrom."));
|
return _error->Error(_("Failed to mount the Media."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hash the CD to get an ID
|
// Hash the CD to get an ID
|
||||||
@ -624,7 +624,7 @@ bool DoAdd(CommandLine &)
|
|||||||
|
|
||||||
cout << '[' << ID << ']' << endl;
|
cout << '[' << ID << ']' << endl;
|
||||||
|
|
||||||
cout << _("Scanning Disc for index files.. ") << flush;
|
cout << _("Scanning Media for index files.. ") << flush;
|
||||||
// Get the CD structure
|
// Get the CD structure
|
||||||
vector<string> List;
|
vector<string> List;
|
||||||
vector<string> sList;
|
vector<string> sList;
|
||||||
@ -700,7 +700,7 @@ bool DoAdd(CommandLine &)
|
|||||||
Name.empty() == true)
|
Name.empty() == true)
|
||||||
{
|
{
|
||||||
// CNC:2003-11-25
|
// CNC:2003-11-25
|
||||||
cout << _("Please provide a name for this Disc, such as 'Distribution Disk 1'");
|
cout << _("Please provide a name for this Media, such as 'Distribution Disk 1'");
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
Name = PromptLine("");
|
Name = PromptLine("");
|
||||||
@ -723,7 +723,7 @@ bool DoAdd(CommandLine &)
|
|||||||
*J = '_';
|
*J = '_';
|
||||||
|
|
||||||
Database.Set("CD::" + ID,Name);
|
Database.Set("CD::" + ID,Name);
|
||||||
cout << _("This Disc is called:") << endl << " '" << Name << "'" << endl;
|
cout << _("This Media is called:") << endl << " '" << Name << "'" << endl;
|
||||||
|
|
||||||
// Copy the package files to the state directory
|
// Copy the package files to the state directory
|
||||||
// CNC:2002-07-11
|
// CNC:2002-07-11
|
||||||
@ -756,7 +756,7 @@ bool DoAdd(CommandLine &)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print the sourcelist entries
|
// Print the sourcelist entries
|
||||||
cout << _("Source List entries for this Disc are:") << endl;
|
cout << _("Source List entries for this Media are:") << endl;
|
||||||
for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
|
for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
|
||||||
{
|
{
|
||||||
string::size_type Space = (*I).find(' ');
|
string::size_type Space = (*I).find(' ');
|
||||||
@ -789,7 +789,7 @@ bool DoAdd(CommandLine &)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << _("Repeat this process for the rest of the CDs in your set.") << endl;
|
cout << _("Repeat this process for the rest of the Media in your set.") << endl;
|
||||||
|
|
||||||
// Unmount and finish
|
// Unmount and finish
|
||||||
// CNC:2002-10-29
|
// CNC:2002-10-29
|
||||||
@ -809,8 +809,8 @@ bool DoIdent(CommandLine &)
|
|||||||
if (CDROM[0] == '.')
|
if (CDROM[0] == '.')
|
||||||
CDROM= SafeGetCWD() + '/' + CDROM;
|
CDROM= SafeGetCWD() + '/' + CDROM;
|
||||||
|
|
||||||
cout << _("Using CD-ROM mount point ") << CDROM << endl;
|
cout << _("Using Media mount point ") << CDROM << endl;
|
||||||
cout << _("Mounting CD-ROM") << endl;
|
cout << _("Mounting Media") << endl;
|
||||||
if (MountCdrom(CDROM) == false)
|
if (MountCdrom(CDROM) == false)
|
||||||
return _error->Error(_("Failed to mount the cdrom."));
|
return _error->Error(_("Failed to mount the cdrom."));
|
||||||
|
|
||||||
@ -852,18 +852,18 @@ int ShowHelp()
|
|||||||
cout <<
|
cout <<
|
||||||
_("Usage: apt-cdrom [options] command\n"
|
_("Usage: apt-cdrom [options] command\n"
|
||||||
"\n"
|
"\n"
|
||||||
"apt-cdrom is a tool to add CDROM's to APT's source list. The\n"
|
"apt-cdrom is a tool to add Media to APT's source list. The\n"
|
||||||
"CDROM mount point and device information is taken from apt.conf\n"
|
"mount point and device information is taken from apt.conf\n"
|
||||||
"and /etc/fstab.\n"
|
"and /etc/fstab.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Commands:\n"
|
"Commands:\n"
|
||||||
" add - Add a CDROM\n"
|
" add - Add a Media\n"
|
||||||
" ident - Report the identity of a CDROM\n"
|
" ident - Report the identity of a Media\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -h This help text\n"
|
" -h This help text\n"
|
||||||
" -d CD-ROM mount point\n"
|
" -d Media mount point\n"
|
||||||
" -r Rename a recognized CD-ROM\n"
|
" -r Rename a recognized Media\n"
|
||||||
" -m No mounting\n"
|
" -m No mounting\n"
|
||||||
" -f Fast mode, don't check package files\n"
|
" -f Fast mode, don't check package files\n"
|
||||||
" -a Thorough scan mode\n"
|
" -a Thorough scan mode\n"
|
||||||
|
@ -78,7 +78,7 @@ string CDROMMethod::PreferredURI()
|
|||||||
if (FileExists(DFile) == true)
|
if (FileExists(DFile) == true)
|
||||||
{
|
{
|
||||||
if (ReadConfigFile(Database,DFile) == false) {
|
if (ReadConfigFile(Database,DFile) == false) {
|
||||||
_error->Error(_("Unable to read the cdrom database %s"),
|
_error->Error(_("Unable to read the media database %s"),
|
||||||
DFile.c_str());
|
DFile.c_str());
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
|
|||||||
if (FileExists(DFile) == true)
|
if (FileExists(DFile) == true)
|
||||||
{
|
{
|
||||||
if (ReadConfigFile(Database,DFile) == false)
|
if (ReadConfigFile(Database,DFile) == false)
|
||||||
return _error->Error(_("Unable to read the cdrom database %s"),
|
return _error->Error(_("Unable to read the media database %s"),
|
||||||
DFile.c_str());
|
DFile.c_str());
|
||||||
}
|
}
|
||||||
DatabaseLoaded = true;
|
DatabaseLoaded = true;
|
||||||
@ -199,8 +199,8 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
|
|||||||
// All non IMS queries for package files fail.
|
// All non IMS queries for package files fail.
|
||||||
if (Itm->IndexFile == true || GetID(Get.Host).empty() == true)
|
if (Itm->IndexFile == true || GetID(Get.Host).empty() == true)
|
||||||
{
|
{
|
||||||
Fail(_("Please use apt-cdrom to make this CD recognized by APT."
|
Fail(_("Please use apt-cdrom to make this media recognized by APT."
|
||||||
" apt-get update cannot be used to add new CDs"));
|
" apt-get update cannot be used to add new Media"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,12 +240,12 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
|
|||||||
|
|
||||||
// I suppose this should prompt somehow?
|
// I suppose this should prompt somehow?
|
||||||
if (UnmountCdrom(CDROM) == false)
|
if (UnmountCdrom(CDROM) == false)
|
||||||
return _error->Error(_("Unable to unmount the CD-ROM in %s, it may still be in use."),
|
return _error->Error(_("Unable to unmount media in %s, it may still be in use."),
|
||||||
CDROM.c_str());
|
CDROM.c_str());
|
||||||
if (MediaFail(Get.Host,CDROM) == false)
|
if (MediaFail(Get.Host,CDROM) == false)
|
||||||
{
|
{
|
||||||
CurrentID = "FAIL";
|
CurrentID = "FAIL";
|
||||||
Fail(_("Wrong CD"),true);
|
Fail(_("Wrong media"),true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user