We can't blindly assume each xml file in a sqlite-enhanced repomd has
authorPanu Matilainen <pmatilai@turre.koti.laiskiainen.org>
Sun, 8 Jul 2007 18:34:01 +0000 (21:34 +0300)
committerPanu Matilainen <pmatilai@turre.koti.laiskiainen.org>
Sun, 8 Jul 2007 18:34:01 +0000 (21:34 +0300)
corresponding _db file, have rpmRepomdIndex::AutoType() check it.

apt-pkg/rpm/rpmindexfile.cc

index a2c5ba5..623eef4 100644 (file)
@@ -643,7 +643,9 @@ string rpmRepomdIndex::IndexURI(string Type) const
 string rpmRepomdIndex::AutoType(string Type) const
 {
    if (HasDBExtension()) {
-      return Type + "_db";
+      if (! Repository->FindURI(Type + "_db").empty()) {
+        return Type + "_db";
+      }
    }
    return Type;
 }