]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
* changelog updated, version is now 0.6.27ubuntu4; added DEB_BUILD_PROG_OPTS to debia...
[apt.git] / apt-pkg / acquire-item.cc
index fcd655f2aaee4b311958bac79dcab2d8f97875f4..d1bed417be17448280f40dfe150a866195336c77 100644 (file)
@@ -352,7 +352,7 @@ string pkgAcqMetaSig::Custom600Headers()
    struct stat Buf;
    if (stat(Final.c_str(),&Buf) != 0)
       return "\nIndex-File: true";
-   
+
    return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
 }
 
@@ -392,8 +392,14 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
    // mistakenly trusted
    string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
    unlink(Final.c_str());
-   Final = _config->FindDir("Dir::State::lists") + "partial/"+ URItoFileName(RealURI);
-   unlink(Final.c_str());
+
+   // if we debug leave the sig-file in partial/ to see what went wrong
+   // else delete it
+   if (!_config->FindB("Debug::pkgAcquire::Auth", false)) {
+      
+      Final = _config->FindDir("Dir::State::lists") + "partial/"+ URItoFileName(RealURI);
+      unlink(Final.c_str());
+   }
 
 
    // queue a pkgAcqMetaIndex with no sigfile