X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9983999d294887046abf386adc31190700d89b61..0977f81757f42889a9edb761061529041afe0a06:/apt-pkg/acquire-item.cc diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 44d45cedb..5187738e9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1288,6 +1288,11 @@ void pkgAcqIndex::ReverifyAfterIMS() // a reverify (as its uncompressed on disk already) DestFile = GetPartialFileNameFromURI(RealURI); + // do not reverify cdrom sources as apt-cdrom may rewrite the Packages + // file when its doing the indexcopy + if (RealURI.substr(0,6) == "cdrom:") + return; + // adjust DestFile if its compressed on disk if (_config->FindB("Acquire::GzipIndexes",false) == true) DestFile += '.' + CurrentCompressionExtension; @@ -1398,11 +1403,6 @@ void pkgAcqIndex::StageDownloadDone(string Message, // on if-modfied-since hit to avoid a stale attack against us if(StringToBool(LookupTag(Message,"IMS-Hit"),false) == true) { - // do not reverify cdrom sources as apt-cdrom may rewrite the Packages - // file when its doing the indexcopy - if (RealURI.substr(0,6) == "cdrom:") - return; - // The files timestamp matches, reverify by copy into partial/ EraseFileName = ""; ReverifyAfterIMS(); @@ -1486,10 +1486,6 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, indexRecords *MetaIndexParser) : pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser) { - // load the filesize - indexRecords::checkSum *Record = MetaIndexParser->Lookup(string(Target->MetaKey)); - if(Record) - FileSize = Record->Size; } /*}}}*/ // AcqIndexTrans::Custom600Headers - Insert custom request headers /*{{{*/ @@ -1742,10 +1738,6 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/ // check if we need to fail at this point if (AuthPass == true && CheckStopAuthentication(RealURI, Message)) return; - else if (AuthPass == false) - _error->Warning(_("The data from '%s' is not signed. Packages " - "from that repository can not be authenticated."), - URIDesc.c_str()); // FIXME: meh, this is not really elegant string InReleaseURI = RealURI.replace(RealURI.rfind("Release.gpg"), 12, @@ -1774,6 +1766,10 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/ return; } } + else + _error->Warning(_("The data from '%s' is not signed. Packages " + "from that repository can not be authenticated."), + URIDesc.c_str()); // this ensures that any file in the lists/ dir is removed by the // transaction