- work around broken createrepo version(s) reporting more packages in the
authorpmatilai <pmatilai>
Mon, 24 Apr 2006 07:07:55 +0000 (07:07 +0000)
committerpmatilai <pmatilai>
Mon, 24 Apr 2006 07:07:55 +0000 (07:07 +0000)
  repository than there are in reality

apt-pkg/rpm/rpmhandler.cc

index ea774bb..6224590 100644 (file)
@@ -912,6 +912,13 @@ RPMRepomdHandler::RPMRepomdHandler(string File, bool useFilelist)
       NodeP = Pkgs[0];
    }
 
+   // There seem to be broken version(s) of createrepo around which report
+   // to have one more package than is in the repository. Warn and work around.
+   if (iSize != pkgcount) {
+      _error->Warning(_("Inconsistent metadata, package count doesn't match in %s"), File.c_str());
+      iSize = pkgcount;
+   }
+
    return;
 
 error: