From 706184a97fdac09ed716298981b84e8a3ab32aac Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 28 Feb 2008 12:23:33 -0500 Subject: [PATCH] Don't force clean the repodata, some of it can be reused. Always make sure we get a clean repomd.xml to compare against the rest of the files. --- Changelog | 4 ++++ src/pypungi/gather.py | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index d4465d75..60d099a5 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +* Thu Feb 28 2008 Jesse Keating +- Make sure we get fresh repomd.xml each time we run +- Don't autoclean the repodata, some of it can be reused + * Thu Feb 21 2008 Jesse Keating - Handle gzipped comps files. diff --git a/src/pypungi/gather.py b/src/pypungi/gather.py index d7f0c81b..008cb92d 100755 --- a/src/pypungi/gather.py +++ b/src/pypungi/gather.py @@ -134,9 +134,13 @@ class Gather(pypungi.PungiBase): self.ayum.repos.setProgressBar(CallBack()) self.ayum.repos.callback = CallBack() - - self.ayum.cleanMetadata() # clean metadata that might be in the cache from previous runs - self.ayum.cleanSqlite() # clean metadata that might be in the cache from previous runs + + # Set the metadata and mirror list to be expired so we always get new ones. + for repo in self.ayum.repos.listEnabled(): + repo.metadata_expire = 0 + repo.mirrorlist_expire = 0 + if os.path.exists(os.path.join(repo.cachedir, 'repomd.xml')): + os.remove(os.path.join(repo.cachedir, 'repomd.xml')) self.logger.info('Getting sacks for arches %s' % arches) self.ayum._getSacks(archlist=arches)