Use a repoview cache.
Make sure the cache dirs exist before using them.
This commit is contained in:
parent
fb6c4402a2
commit
5abaa9b226
@ -1,3 +1,6 @@
|
|||||||
|
* Mon Dec 10 Jesse Keating <jkeating@redhat.com>
|
||||||
|
- Use a repoview cache.
|
||||||
|
|
||||||
* Sat Dec 08 Jesse Keating <jkeating@redhat.com>
|
* Sat Dec 08 Jesse Keating <jkeating@redhat.com>
|
||||||
- Use a createrepo cache.
|
- Use a createrepo cache.
|
||||||
|
|
||||||
|
@ -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')))
|
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
|
# setup the createrepo call
|
||||||
createrepo = ['/usr/bin/createrepo']
|
createrepo = ['/usr/bin/createrepo']
|
||||||
@ -92,6 +101,11 @@ class Pungi(pypungi.PungiBase):
|
|||||||
# setup the repoview call
|
# setup the repoview call
|
||||||
repoview = ['/usr/bin/repoview']
|
repoview = ['/usr/bin/repoview']
|
||||||
repoview.append('--quiet')
|
repoview.append('--quiet')
|
||||||
|
|
||||||
|
repoview.append('--state-dir')
|
||||||
|
repoview.append(os.path.join(self.config.get('default', 'cachedir'),
|
||||||
|
'repoviewcache'))
|
||||||
|
|
||||||
repoview.append('--title')
|
repoview.append('--title')
|
||||||
if self.config.get('default', 'flavor'):
|
if self.config.get('default', 'flavor'):
|
||||||
repoview.append('%s %s: %s - %s' % (self.config.get('default', 'name'),
|
repoview.append('%s %s: %s - %s' % (self.config.get('default', 'name'),
|
||||||
|
Loading…
Reference in New Issue
Block a user