| |
@@ -9889,7 +9889,6 @@
|
| |
policy_data['source'] = params.get(k)
|
| |
break
|
| |
# parameters that indicate build target
|
| |
- target = None
|
| |
hastarget = False
|
| |
for k in ('target', 'build_target', 'target_info'):
|
| |
if k in params:
|
| |
@@ -9903,10 +9902,15 @@
|
| |
target = None
|
| |
else:
|
| |
target = target.get('name')
|
| |
- if target is None:
|
| |
- policy_data['target'] = None
|
| |
- else:
|
| |
- policy_data['target'] = get_build_target(target, strict=True)['name']
|
| |
+ if target is not None:
|
| |
+ tinfo = lookup_build_target(target, strict=False)
|
| |
+ if tinfo is None:
|
| |
+ logger.warning("No such build target: %s", target)
|
| |
+ target = None
|
| |
+ else:
|
| |
+ target = tinfo['name']
|
| |
+ policy_data['target'] = target
|
| |
+
|
| |
t_opts = params.get('opts', {})
|
| |
policy_data['scratch'] = t_opts.get('scratch', False)
|
| |
|
| |
for build task, the
build target
could bedestination tag
whenopts.repo_id
is specifiedfixes #3941