Red Hat Bugzilla – Bug 857090
beaker-wizard: [RFE] add RhtsRequires into options/skeleton
Last modified: 2015-11-22 22:53:34 EST
Description of problem:
I made test with code which I'd like to share in subset of tests.
To avoid mistakes I'd like make a skeleton which will uses the shared code, but there is no way (AFAIK) how to customize the created Makefile to include the dependency.
One of the options seemed to use alias for added '-q test-package' option, which will create the "Require: test-package", however in the documentation is stated that preferred way is to use "RhtsRequires: test(/path/to/library/task)".
The -q options fails with "test(TESTNAME) is not a valid required package", which might be the correct behaviour. (or I am wrong and it test(TESTNAME) can be used in Require: too?)
Please be so kind and add option to specify Rhtsrequires from command line.
If there was an option how to customize it via skeletons it would be great.
Version-Release number of selected component (if applicable):
(In reply to comment #0)
> Description of problem:
> The -q options fails with "test(TESTNAME) is not a valid required package",
> which might be the correct behaviour. (or I am wrong and it test(TESTNAME)
> can be used in Require: too?)
Unfortunately no. Hard requires (RhtsRequires) are added to the
test rpm and that is installed only before task execution. Soft
requires (Requires) are placed into kickstart but at that time
task repositories are not available yet.
> Please be so kind and add option to specify Rhtsrequires from
> command line. If there was an option how to customize it via
> skeletons it would be great.
Hm, interesting idea. We could probably add the requires to the
skeleton tag like this:
<skeleton name="skel1" requires="x y z" rhtsrequires="a">
This is skeleton 1 example.
Would that work for you? However, I believe RhtsRequires should be
obsoleted as this is still referring to the old test system. I've
filed bug 857332 to track this. Will continue with the
implementation once the new name is available.
Thanks for the explanation.
The proposed solution with skeleton attributes will be more then satisfying.
Is/will be possible to add other Makefile metadata as confidential, destructive,
run for packages, required packages into the skeleton too?
Solution in comment 1 seems fine.
One more idea I had is beaker-wizard to scan skeleton content for rlImport commands and use them to fill RhtsRequires. That would be nice 1-place solution, but probably too costy for our use case.
Created attachment 922910 [details]
support for rhtsrequires="..." in <skeleton>
please have a look at the patch and tell me whether it works as expected.
It supports rhtsrequires="..." in <skeleton>. Support for requires="..." can be added in a similar manner.
> > Please be so kind and add option to specify Rhtsrequires from
> > command line. If there was an option how to customize it via
> > skeletons it would be great.
> Hm, interesting idea. We could probably add the requires to the
> skeleton tag like this:
> <skeleton name="skel1" requires="x y z" rhtsrequires="a">
> This is skeleton 1 example.
Hm, something is broken:
My skeleton contains:
<skeleton name="test" rhtsrequires="library(perl/lib1) library(scl/lib2)">
But when running I get:
RhtsRequires: libraries which test depends on
[library(perl/lib1) is not a valid rhtsrequired package, what about None?]
The check has to be fixed as well, probably.
Also the "libraries which test depends on" is not 100% correct. It can be anything, difference to Requires is only that it is installed by yum instead of kickstart.
Created attachment 924261 [details]
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>
Thanks, Lukas. How about this one? Valid characters now include ()/. And the text has been modified.
Created attachment 924520 [details]
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch
I uploaded some patch from an incorrect directory previously
Thank you Martin.
From my PoV patch from comment 8 fixes this bug.
Patch submitted to Gerrit.
I won't be able to proceed. There is a functional/unit test to be written for it. Feel free to follow if you would like to.
I have added the test cases in your patch and feel free to leave comments.
This bug fix is included in beaker-client-22.0-0.git.89.5c48126 which is available for download here:
Beaker 21.2 has been released.