set %distribution the same way we set %vendor and %packager
This commit is contained in:
parent
c53ab40cea
commit
66ffd25470
2 changed files with 7 additions and 9 deletions
|
|
@ -307,7 +307,7 @@ class BuildRoot(object):
|
|||
self.name = "%(tag_name)s-%(id)s-%(repoid)s" % vars(self)
|
||||
self.config = session.getBuildConfig(self.tag_id, event=self.event_id)
|
||||
|
||||
def _new(self, tag, arch, task_id, distribution=None, repo_id=None, install_group='build', setup_dns=False):
|
||||
def _new(self, tag, arch, task_id, repo_id=None, install_group='build', setup_dns=False):
|
||||
"""Create a brand new repo"""
|
||||
if not repo_id:
|
||||
raise koji.BuildrootError, "A repo id must be provided"
|
||||
|
|
@ -316,11 +316,6 @@ class BuildRoot(object):
|
|||
self.repoid = self.repo_info['id']
|
||||
self.event_id = self.repo_info['create_event']
|
||||
self.task_id = task_id
|
||||
self.distribution = distribution
|
||||
if not self.distribution:
|
||||
# Provide a default if the srpm did not contain a 'distribution' header,
|
||||
# e.g. if it was built by hand
|
||||
self.distribution = 'Unknown'
|
||||
self.config = session.getBuildConfig(tag, event=self.event_id)
|
||||
if not self.config:
|
||||
raise koji.BuildrootError("Could not get config info for tag: %s" % tag)
|
||||
|
|
@ -355,10 +350,10 @@ class BuildRoot(object):
|
|||
self.mockcfg = "koji/%s" % self.name
|
||||
|
||||
opts = {}
|
||||
for k in ('repoid', 'tag_name', 'distribution'):
|
||||
for k in ('repoid', 'tag_name'):
|
||||
if hasattr(self, k):
|
||||
opts[k] = getattr(self, k)
|
||||
for k in ('mockdir', 'topdir', 'topurl', 'packager', 'vendor', 'mockhost'):
|
||||
for k in ('mockdir', 'topdir', 'topurl', 'packager', 'vendor', 'distribution', 'mockhost'):
|
||||
if hasattr(options, k):
|
||||
opts[k] = getattr(options, k)
|
||||
opts['buildroot_id'] = self.id
|
||||
|
|
@ -1889,7 +1884,6 @@ class BuildArchTask(BaseTaskHandler):
|
|||
# raise koji.BuildError, "the distribution tag is not set in the original srpm"
|
||||
|
||||
rootopts = {
|
||||
'distribution' : h[rpm.RPMTAG_DISTRIBUTION],
|
||||
'repo_id': repo_id
|
||||
}
|
||||
br_arch = self.find_arch(arch, session.host.getHost(), session.getBuildConfig(root, event=event_id))
|
||||
|
|
@ -2927,6 +2921,7 @@ def get_options():
|
|||
'mockuser': 'kojibuilder',
|
||||
'packager': 'Koji',
|
||||
'vendor': 'Koji',
|
||||
'distribution': 'Koji',
|
||||
'mockhost': 'koji-linux-gnu',
|
||||
'smtphost': 'example.com',
|
||||
'from_addr': 'Koji Build System <buildsys@example.com>',
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
; The packager to use in rpm headers
|
||||
; packager=Koji
|
||||
|
||||
; The distribution to use in rpm headers
|
||||
; distribution=Koji
|
||||
|
||||
; The _host string to use in mock
|
||||
; mockhost=koji-linux-gnu
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue