diff --git a/Changelog b/Changelog index 60d099a5..90f3cd0e 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,8 @@ * 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 +- Clear out the repodata we copy out temporarily, so that we don't + traceback on --force runs. * Thu Feb 21 2008 Jesse Keating - Handle gzipped comps files. diff --git a/src/pypungi/pungi.py b/src/pypungi/pungi.py index cc240b41..133bbd86 100755 --- a/src/pypungi/pungi.py +++ b/src/pypungi/pungi.py @@ -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'))