| |
@@ -2134,50 +2134,13 @@
|
| |
if not modmd_path:
|
| |
raise(e)
|
| |
|
| |
- buildrequires = self.args.buildrequires or []
|
| |
- branch_search = None
|
| |
- if branch:
|
| |
- try:
|
| |
- # The regexes to parse the base module stream override from the dist-git branch
|
| |
- # name. For example, if you had a branch called `10-fedora-29.0.1` and you wanted to
|
| |
- # parse `f29.0.1` from that as the stream to use for the base module, you could
|
| |
- # have a regex of `(f)(?:edora)(?:\-)(\d+\.\d+\.\d+)$`. Then after combining
|
| |
- # the capture groups, you'd get the desired result of `f29.0.1`.
|
| |
- branch_bm_regexes = self.config.get(
|
| |
- self.config_section, 'base_module_stream_regex_from_branch').strip().split('\n')
|
| |
- # The base module (e.g. platform) to apply the buildrequire override to if the
|
| |
- # parsing of the branch name is successfull
|
| |
- bm = self.config.get(self.config_section, 'base_module')
|
| |
- except configparser.NoOptionError:
|
| |
- pass
|
| |
- else:
|
| |
- # Check if any of the regexes match, and break after the first match
|
| |
- for regex in branch_bm_regexes:
|
| |
- branch_search = re.search(regex, branch)
|
| |
- if branch_search:
|
| |
- break
|
| |
-
|
| |
- if branch_search:
|
| |
- # Concatenate all the groups that are not None together to get the desired stream.
|
| |
- # This approach is taken in case there are sections to ignore.
|
| |
- # For instance, if we need to parse `f27.0.0` from `fedora-27.0.0`.
|
| |
- bm_stream = ''.join(group for group in branch_search.groups() if group)
|
| |
- # Don't override the base module buildrequire if the user
|
| |
- # manually already overrode it with the `--buildrequire` argument
|
| |
- if not any(br[0] == bm for br in buildrequires):
|
| |
- buildrequires.append((bm, bm_stream))
|
| |
- if not self.args.q:
|
| |
- print('Added the buildrequire override "{0}" based on '
|
| |
- 'the module branch name'
|
| |
- .format('{0}:{1}'.format(bm, bm_stream)))
|
| |
-
|
| |
auth_method, oidc_id_provider, oidc_client_id, oidc_client_secret, \
|
| |
oidc_scopes = self.module_get_auth_config()
|
| |
|
| |
if not self.args.q:
|
| |
print('Submitting the module build...')
|
| |
build_ids = self._cmd.module_submit_build(
|
| |
- scm_url, branch, auth_method, buildrequires, self.args.requires,
|
| |
+ scm_url, branch, auth_method, self.args.buildrequires, self.args.requires,
|
| |
self.args.optional, oidc_id_provider, oidc_client_id,
|
| |
oidc_client_secret, oidc_scopes,
|
| |
self.args.scratch, modmd_path, srpm_links)
|
| |
This functionality was moved to MBS directly instead of having rpkg do it:
https://pagure.io/fm-orchestrator/pull-request/1176