summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-01-22 12:52:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-23 17:08:49 +0000
commit88cd40c08109bf732934fa4c8d602c701c1eb2a0 (patch)
tree014d49683f9cedc67f565cbc9b4fc650b02be707
parentb58e808a087bbc0a5abd78fd34bb6f1c0c93ba25 (diff)
downloadopenembedded-core-88cd40c08109bf732934fa4c8d602c701c1eb2a0.tar.gz
lib/oe/package_manager: ensure repodata is wiped
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>
-rw-r--r--meta/lib/oe/package_manager/rpm/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index 898184442f..6df0092281 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -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]):