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.
This commit is contained in:
Jesse Keating 2008-02-28 12:23:33 -05:00 committed by Jesse Keating
parent eb1a47579f
commit 706184a97f
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,7 @@
* Thu Feb 28 2008 Jesse Keating <jkeating@redhat.com>
- 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 <jkeating@redhat.com> * Thu Feb 21 2008 Jesse Keating <jkeating@redhat.com>
- Handle gzipped comps files. - Handle gzipped comps files.

View File

@ -134,9 +134,13 @@ class Gather(pypungi.PungiBase):
self.ayum.repos.setProgressBar(CallBack()) self.ayum.repos.setProgressBar(CallBack())
self.ayum.repos.callback = CallBack() self.ayum.repos.callback = CallBack()
self.ayum.cleanMetadata() # 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.
self.ayum.cleanSqlite() # clean metadata that might be in the cache from previous runs 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.logger.info('Getting sacks for arches %s' % arches)
self.ayum._getSacks(archlist=arches) self.ayum._getSacks(archlist=arches)