Bug 857090 - beaker-wizard: [RFE] add RhtsRequires into options/skeleton
Summary: beaker-wizard: [RFE] add RhtsRequires into options/skeleton
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 21.2
Assignee: matt jia
QA Contact:
URL:
Whiteboard: QE
Depends On: 857332
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-13 14:37 UTC by Lukáš Zachar
Modified: 2015-11-23 03:53 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-23 03:53:34 UTC
Embargoed:


Attachments (Terms of Use)
support for rhtsrequires="..." in <skeleton> (5.56 KB, patch)
2014-07-31 12:53 UTC, Martin Žember
mzember: review-
Details | Diff
support for rhtsrequires="library(perl/lib1) ..." in <skeleton> (5.56 KB, patch)
2014-08-05 17:17 UTC, Martin Žember
no flags Details | Diff
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch (6.27 KB, patch)
2014-08-06 15:15 UTC, Martin Žember
no flags Details | Diff

Description Lukáš Zachar 2012-09-13 14:37:44 UTC
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):
rhts-devel-4.50-1.el6eng

Comment 1 Petr Šplíchal 2012-09-14 07:08:45 UTC
(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.
        </skeleton>

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.

Comment 2 Lukáš Zachar 2012-09-14 09:17:59 UTC
Hi Petr,
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?

Comment 3 David Kutálek 2013-04-07 10:40:22 UTC
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.

Comment 5 Martin Žember 2014-07-31 12:53:10 UTC
Created attachment 922910 [details]
support for rhtsrequires="..." in <skeleton>

Lukas,
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.
>         </skeleton>

Comment 6 Lukáš Zachar 2014-08-04 08:11:25 UTC
Hm, something is broken:

My skeleton contains:
        <skeleton name="test" rhtsrequires="library(perl/lib1) library(scl/lib2)">
            PACKAGES="<package/>"
        </skeleton>
    </skeletons>

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.

Comment 7 Martin Žember 2014-08-05 17:17:45 UTC
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.

Comment 8 Martin Žember 2014-08-06 15:15:06 UTC
Created attachment 924520 [details]
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch

I uploaded some patch from an incorrect directory previously

Comment 9 Lukáš Zachar 2014-08-06 15:31:24 UTC
Thank you Martin. 
From my PoV patch from comment 8 fixes this bug.

Comment 10 Martin Žember 2014-11-21 16:42:50 UTC
Patch submitted to Gerrit.
http://gerrit.beaker-project.org/#/c/3499/

Comment 11 Martin Žember 2015-06-30 03:03:43 UTC
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.

Comment 12 matt jia 2015-10-28 00:04:04 UTC
Hi Martin,

I have added the test cases in your patch and feel free to leave comments.

  http://gerrit.beaker-project.org/#/c/4460/

Comment 13 Dan Callaghan 2015-11-13 03:10:46 UTC
This bug fix is included in beaker-client-22.0-0.git.89.5c48126 which is available for download here:

https://beaker-project.org/nightlies/develop/

Comment 15 matt jia 2015-11-23 03:53:34 UTC
Beaker 21.2 has been released.


Note You need to log in before you can comment on or make changes to this bug.