Red Hat Bugzilla – Bug 1014693
hostrequire should not process args other than verify it is valid xml.
Last modified: 2014-06-10 19:28:05 EDT
Description of problem:
Change --hostrequire to simply pass its argument as a child to <hostRequire>
Currently it's impossible to pass a requirement on <device/> from the command line.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. bkr workflow-simple --dryrun --distro rhel-6.4 --arch x86_64 --variant Server --hostrequire "<device/>" --task /distribution/reservesys
Traceback (most recent call last):
File "/usr/bin/bkr", line 9, in <module>
load_entry_point('bkr.client==0.14.1', 'console_scripts', 'bkr')()
File "/usr/lib/python2.7/site-packages/bkr/client/main.py", line 50, in main
return cmd.run(*cmd_args, **cmd_opts.__dict__)
File "/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_workflow_simple.py", line 101, in run
File "/usr/lib/python2.7/site-packages/bkr/client/__init__.py", line 634, in addBaseRequires
key, op, value = p2.split(require,3)
pass the valid xml through to the job xml.
We would need to continue supporting the existing usage of --hostrequires though, which doesn't work for <device/> but does work for most other XML filters.
We could probably pass the value through directly if it begins with <, otherwise use the existing operator parsing logic.
Dan's suggested approach sounds good to me (and relatively straightforward).
On Gerrit: http://gerrit.beaker-project.org/3073
This bug fix has been applied to the release-0.16 branch, however we have elected not to do another maintenance release of the 0.16.x series. This fix will be included in 0.17.0 instead.
Beaker 0.17.0 has been released.