mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
- support %(apihost)s in the "build-root" config option
apihost is the hostname extracted from currently used apiurl
This commit is contained in:
parent
09c46bd7c3
commit
35bf60bbf0
@ -9,6 +9,7 @@ import os
|
||||
import re
|
||||
import sys
|
||||
import shutil
|
||||
import urlparse
|
||||
from tempfile import NamedTemporaryFile, mkdtemp
|
||||
from osc.fetch import *
|
||||
from osc.core import get_buildinfo, store_read_apiurl, store_read_project, store_read_package, meta_exists, quote_plus, get_buildconfig, is_package_dir
|
||||
@ -462,9 +463,9 @@ def main(apiurl, opts, argv):
|
||||
if opts.local_package:
|
||||
pacname = os.path.splitext(build_descr)[0]
|
||||
if not build_root:
|
||||
build_root = config['build-root'] % { 'repo': repo, 'arch': arch,
|
||||
'project' : prj, 'package' : pacname
|
||||
}
|
||||
apihost = urlparse.urlsplit(apiurl)[1]
|
||||
build_root = config['build-root'] % {'repo': repo, 'arch': arch,
|
||||
'project': prj, 'package': pacname, 'apihost': apihost}
|
||||
|
||||
extra_pkgs = []
|
||||
if not opts.extra_pkgs:
|
||||
|
@ -167,7 +167,8 @@ apiurl = %(apiurl)s
|
||||
#su-wrapper = %(su-wrapper)s
|
||||
|
||||
# rootdir to setup the chroot environment
|
||||
# can contain %%(repo)s, %%(arch)s, %%(project)s and %%(package)s for replacement, e.g.
|
||||
# can contain %%(repo)s, %%(arch)s, %%(project)s, %%(package)s and %%(apihost)s (apihost is the hostname
|
||||
# extracted from currently used apiurl) for replacement, e.g.
|
||||
# /srv/oscbuild/%%(repo)s-%%(arch)s or
|
||||
# /srv/oscbuild/%%(repo)s-%%(arch)s-%%(project)s-%%(package)s
|
||||
#build-root = %(build-root)s
|
||||
|
Loading…
Reference in New Issue
Block a user