]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager: ensure repodata is wiped
authorRoss Burton <ross@burtonini.com>
Fri, 22 Jan 2021 12:52:05 +0000 (12:52 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Jan 2021 17:08:49 +0000 (17:08 +0000)
When building package indexes for RPM feeds, delete repodata first to
be absolutely sure that the indexes are up to date.

We've seen some mysterious failures where the repodata doesn't match
the repository, so hopefully this will stop that happening.

[ YOCTO #14190 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager/rpm/__init__.py

index 898184442fd3fa6fde37ef43135151c7d10a45c8..6df00922811334e0f912d19e2dc29299113a7b6c 100644 (file)
@@ -33,6 +33,9 @@ class RpmIndexer(Indexer):
 class RpmSubdirIndexer(RpmIndexer):
     def write_index(self):
         bb.note("Generating package index for %s" %(self.deploy_dir))
+        # Remove the existing repodata to ensure that we re-generate it no matter what
+        bb.utils.remove(os.path.join(self.deploy_dir, "repodata"), recurse=True)
+
         self.do_write_index(self.deploy_dir)
         for entry in os.walk(self.deploy_dir):
             if os.path.samefile(self.deploy_dir, entry[0]):