]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
On IMS-Hit, you can't assume local compression :/.
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 8d84409a13b767814970d5c069a67c2ebea47e65..091b187a2a7d5b0011373d02f44161250a4a707f 100644 (file)
@@ -373,7 +373,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
    if (OpenMaybeClearSignedFile(Filename, Fd) == false)
       return false;
 
-   pkgTagFile TagFile(&Fd, Fd.Size());
+   pkgTagFile TagFile(&Fd);
    if (Fd.IsOpen() == false || Fd.Failed())
    {
       if (ErrorText != NULL)
@@ -440,18 +440,15 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
 
    bool AuthPossible = false;
    if(FoundHashSum == false)
-      _error->Warning(_("No Hash entry in Release file %s"), Filename.c_str());
+      /*_error->Warning(_("No Hash entry in Release file %s"), Filename.c_str())*/;
    else if(FoundStrongHashSum == false)
-      _error->Warning(_("No Hash entry in Release file %s which is considered strong enough for security purposes"), Filename.c_str());
+      /*_error->Warning(_("No Hash entry in Release file %s which is considered strong enough for security purposes"), Filename.c_str())*/;
    else
       AuthPossible = true;
 
    std::string const StrDate = Section.FindS("Date");
    if (RFC1123StrToTime(StrDate.c_str(), Date) == false)
-   {
-      _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str());
       Date = 0;
-   }
 
    bool CheckValidUntil = _config->FindB("Acquire::Check-Valid-Until", true);
    if (d->CheckValidUntil == metaIndex::TRI_NO)
@@ -461,6 +458,9 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
 
    if (CheckValidUntil == true)
    {
+      if (Date == 0)
+          _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str());
+
       std::string const Label = Section.FindS("Label");
       std::string const StrValidUntil = Section.FindS("Valid-Until");
 
@@ -801,7 +801,7 @@ bool debReleaseIndex::Merge(pkgCacheGenerator &Gen,OpProgress * /*Prog*/) const/
    File->Size = Buf.st_size;
    File->mtime = Buf.st_mtime;
 
-   pkgTagFile TagFile(&Rel, Rel.Size());
+   pkgTagFile TagFile(&Rel);
    pkgTagSection Section;
    if (Rel.IsOpen() == false || Rel.Failed() || TagFile.Step(Section) == false)
       return false;