Просмотр исходного кода

Adjust DestFile in ReverifyAfterIMS() to not include compr Extension

Michael Vogt лет назад: 11
Родитель
Сommit
c36db2b56a
2 измененных файлов с 8 добавлено и 1 удалено
  1. 7 0
      apt-pkg/acquire-item.cc
  2. 1 1
      apt-pkg/contrib/fileutl.cc

+ 7 - 0
apt-pkg/acquire-item.cc

@@ -1104,6 +1104,13 @@ std::string pkgAcqIndex::GetFinalFilename() const
 void pkgAcqIndex::ReverifyAfterIMS()
 {
    std::string const compExt = CompressionExtension.substr(0, CompressionExtension.find(' '));
+
+   // update destfile to *not* include the compression extension when doing
+   // a reverify (as its uncompressed on disk already)
+   DestFile =  _config->FindDir("Dir::State::lists") + "partial/";
+   DestFile += URItoFileName(RealURI);
+
+   // adjust DestFile if its compressed on disk
    if (_config->FindB("Acquire::GzipIndexes",false) == true)
       DestFile += compExt;
 

+ 1 - 1
apt-pkg/contrib/fileutl.cc

@@ -1525,7 +1525,7 @@ bool FileFd::Read(void *To,unsigned long long Size,unsigned long long *Actual)
 	    int err;
 	    char const * const errmsg = BZ2_bzerror(d->bz2, &err);
 	    if (err != BZ_IO_ERROR)
-	       return FileFdError("BZ2_bzread: %s (%d: %s)", _("Read error"), err, errmsg);
+	       return FileFdError("BZ2_bzread: %s %s (%d: %s)", FileName.c_str(), _("Read error"), err, errmsg);
 	 }
 #endif
 #ifdef HAVE_LZMA