Don't traceback when moving repodata out for split media.

This commit is contained in:
Jesse Keating 2008-02-28 16:29:46 -05:00 committed by Jesse Keating
parent 706184a97f
commit 7b27cd5c8b
2 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,8 @@
* 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
- Clear out the repodata we copy out temporarily, so that we don't
traceback on --force runs.
* Thu Feb 21 2008 Jesse Keating <jkeating@redhat.com>
- Handle gzipped comps files.

View File

@ -418,6 +418,11 @@ cost=500
if not self.config.get('default', 'arch') == 'source':
# move the main repodata out of the way to use the split repodata
if os.path.isdir(os.path.join(self.config.get('default', 'destdir'),
'repodata-%s' % self.config.get('default', 'arch'))):
shutil.rmtree(os.path.join(self.config.get('default', 'destdir'),
'repodata-%s' % self.config.get('default', 'arch')))
shutil.move(os.path.join(self.topdir, 'repodata'), os.path.join(self.config.get('default', 'destdir'),
'repodata-%s' % self.config.get('default', 'arch')))
shutil.copytree('%s-disc1/repodata' % self.topdir, os.path.join(self.topdir, 'repodata'))