Fix assert failure in some cases where repomd.xml can't be found
authorPanu Matilainen <pmatilai@laiskiainen.org>
Mon, 19 Nov 2007 07:09:39 +0000 (09:09 +0200)
committerPanu Matilainen <pmatilai@laiskiainen.org>
Mon, 19 Nov 2007 07:09:39 +0000 (09:09 +0200)
apt-pkg/rpm/rpmindexfile.cc

index 937712a..1e1eb22 100644 (file)
@@ -561,7 +561,12 @@ string rpmRepomdIndex::ArchiveInfo(pkgCache::VerIterator Ver) const
 }
 pkgCache::PkgFileIterator rpmRepomdIndex::FindInCache(pkgCache &Cache) const
 {
-   string FileName = IndexPath();
+   string FileName = "";
+   /* repomd requires release to be present to find any other files */
+   if (FileExists(ReleasePath())) {
+      FileName = IndexPath();
+   }
+
    pkgCache::PkgFileIterator File = Cache.FileBegin();
    for (; File.end() == false; File++)
    {