Add functionality to pass multiple repos, mirrorlists, and output directory to buildinstall.
This commit is contained in:
parent
64e5734178
commit
379020e5c5
@ -129,6 +129,8 @@ class Pungi(pypungi.PungiBase):
|
|||||||
self.polist = []
|
self.polist = []
|
||||||
self.srpmlist = []
|
self.srpmlist = []
|
||||||
self.resolved_deps = {} # list the deps we've already resolved, short circuit.
|
self.resolved_deps = {} # list the deps we've already resolved, short circuit.
|
||||||
|
self.repos = []
|
||||||
|
self.mirrorlists = []
|
||||||
|
|
||||||
# Create a yum object to use
|
# Create a yum object to use
|
||||||
self.ayum = PungiYum(config)
|
self.ayum = PungiYum(config)
|
||||||
@ -176,9 +178,11 @@ class Pungi(pypungi.PungiBase):
|
|||||||
# add excludes and such here when pykickstart gets them
|
# add excludes and such here when pykickstart gets them
|
||||||
if repo.mirrorlist:
|
if repo.mirrorlist:
|
||||||
thisrepo.mirrorlist = yum.parser.varReplace(repo.mirrorlist, self.ayum.conf.yumvar)
|
thisrepo.mirrorlist = yum.parser.varReplace(repo.mirrorlist, self.ayum.conf.yumvar)
|
||||||
|
self.mirrorlists.extend('thisrepo.mirrorlist')
|
||||||
self.logger.info('Mirrorlist for repo %s is %s' % (thisrepo.name, thisrepo.mirrorlist))
|
self.logger.info('Mirrorlist for repo %s is %s' % (thisrepo.name, thisrepo.mirrorlist))
|
||||||
else:
|
else:
|
||||||
thisrepo.baseurl = yum.parser.varReplace(repo.baseurl, self.ayum.conf.yumvar)
|
thisrepo.baseurl = yum.parser.varReplace(repo.baseurl, self.ayum.conf.yumvar)
|
||||||
|
self.repos.extend('thisrepo.baseurl')
|
||||||
self.logger.info('URL for repo %s is %s' % (thisrepo.name, thisrepo.baseurl))
|
self.logger.info('URL for repo %s is %s' % (thisrepo.name, thisrepo.baseurl))
|
||||||
thisrepo.basecachedir = self.ayum.conf.cachedir
|
thisrepo.basecachedir = self.ayum.conf.cachedir
|
||||||
thisrepo.enablegroups = True
|
thisrepo.enablegroups = True
|
||||||
@ -580,8 +584,19 @@ class Pungi(pypungi.PungiBase):
|
|||||||
buildinstall.append('--bugurl')
|
buildinstall.append('--bugurl')
|
||||||
buildinstall.append(self.config.get('default', 'bugurl'))
|
buildinstall.append(self.config.get('default', 'bugurl'))
|
||||||
|
|
||||||
|
buildinstall.append'--output')
|
||||||
buildinstall.append(self.topdir)
|
buildinstall.append(self.topdir)
|
||||||
|
|
||||||
|
for mirrorlist in self.mirrorlists:
|
||||||
|
buildinstall.append('--mirrorlist')
|
||||||
|
buildinstall.append(mirorrlist)
|
||||||
|
|
||||||
|
buildinstall.append(self.topdir)
|
||||||
|
|
||||||
|
# Add any extra repos of baseurl type
|
||||||
|
for repo in self.repos:
|
||||||
|
buildinstall.append(repo)
|
||||||
|
|
||||||
# run the command
|
# run the command
|
||||||
# TMPDIR is still broken with buildinstall.
|
# TMPDIR is still broken with buildinstall.
|
||||||
pypungi.util._doRunCommand(buildinstall, self.logger) #, env={"TMPDIR": self.workdir})
|
pypungi.util._doRunCommand(buildinstall, self.logger) #, env={"TMPDIR": self.workdir})
|
||||||
|
Loading…
Reference in New Issue
Block a user