Use a repoview cache.

Make sure the cache dirs exist before using them.
This commit is contained in:
Jesse Keating 2007-12-10 14:14:06 -05:00 committed by Jesse Keating
parent fb6c4402a2
commit 5abaa9b226
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,6 @@
* Mon Dec 10 Jesse Keating <jkeating@redhat.com>
- Use a repoview cache.
* Sat Dec 08 Jesse Keating <jkeating@redhat.com>
- Use a createrepo cache.

View File

@ -71,6 +71,15 @@ class Pungi(pypungi.PungiBase):
compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('default', 'name'), self.config.get('default', 'version')))
# setup the cache dirs
for target in [os.path.join(self.config.get('default', 'cachedir',
'createrepocache')),
os.path.join(self.config.get('default', 'cachedir',
'repoviewcache'))]:
pypungi._ensuredir(target,
self.logger,
force=True)
# setup the createrepo call
createrepo = ['/usr/bin/createrepo']
@ -92,6 +101,11 @@ class Pungi(pypungi.PungiBase):
# setup the repoview call
repoview = ['/usr/bin/repoview']
repoview.append('--quiet')
repoview.append('--state-dir')
repoview.append(os.path.join(self.config.get('default', 'cachedir'),
'repoviewcache'))
repoview.append('--title')
if self.config.get('default', 'flavor'):
repoview.append('%s %s: %s - %s' % (self.config.get('default', 'name'),