apt/apt-0.5.15cnc5-alt-md5hash-debug.patch
Dmitry V. Levin 0501f88ac1 0.5.15cnc5-alt1
- Specfile cleanup.
- Rediffed patches.
- Fixed --help/--version segfault.
- Fixed some compilation warnings.
- Relocated methods to /usr/lib/apt/methods/.
2004-01-16 19:01:26 +00:00

39 lines
1.5 KiB
Diff

diff -uprk.orig apt-0.5.15cnc5.orig/apt-pkg/acquire-item.cc apt-0.5.15cnc5/apt-pkg/acquire-item.cc
--- apt-0.5.15cnc5.orig/apt-pkg/acquire-item.cc 2003-12-23 23:20:28 +0300
+++ apt-0.5.15cnc5/apt-pkg/acquire-item.cc 2004-01-16 15:26:05 +0300
@@ -824,7 +824,10 @@ void pkgAcqArchive::Done(string Message,
{
if (Md5Hash != MD5)
{
- Status = StatError;
+ if (_config->FindB("Debug::pkgAcquire::Auth", false)) {
+ cerr << "md5 mismatch: " << Md5Hash << "!=" << MD5 << endl;
+ }
+ Status = StatError;
ErrorText = _("MD5Sum mismatch");
Rename(DestFile,DestFile + ".FAILED");
return;
@@ -968,6 +971,9 @@ void pkgAcqFile::Done(string Message,uns
{
if (Md5Hash != MD5)
{
+ if (_config->FindB("Debug::pkgAcquire::Auth", false)) {
+ cerr << "md5 mismatch: " << Md5Hash << "!=" << MD5 << endl;
+ }
Status = StatError;
ErrorText = "MD5Sum mismatch";
Rename(DestFile,DestFile + ".FAILED");
diff -uprk.orig apt-0.5.15cnc5.orig/cmdline/apt-get.cc apt-0.5.15cnc5/cmdline/apt-get.cc
--- apt-0.5.15cnc5.orig/cmdline/apt-get.cc 2003-12-23 23:30:50 +0300
+++ apt-0.5.15cnc5/cmdline/apt-get.cc 2004-01-16 15:26:05 +0300
@@ -2382,6 +2382,9 @@ bool DoSource(CommandLine &CmdL)
I->Type != "tar")
continue;
+ if (_config->FindB("Debug::pkgAcquire::Auth",false) == true)
+ cerr << "I->Path = " << I->Path << ", I->MD5Hash = " << I->MD5Hash << endl;
+
new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path),
I->MD5Hash,I->Size,
Last->Index().SourceInfo(*Last,*I),Src);