Bug 928847 - [RFE] rlImport should allow to import all libraries specified in Makefile
Summary: [RFE] rlImport should allow to import all libraries specified in Makefile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Petr Muller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 928857
TreeView+ depends on / blocked
 
Reported: 2013-03-28 15:07 UTC by Dalibor Pospíšil
Modified: 2016-09-20 02:09 UTC (History)
3 users (show)

Fixed In Version: beakerlib-1.7-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 947545 (view as bug list)
Environment:
Last Closed: 2013-05-22 03:10:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
rlImportAll.patch (1.27 KB, patch)
2013-03-28 15:07 UTC, Dalibor Pospíšil
no flags Details | Diff

Description Dalibor Pospíšil 2013-03-28 15:07:10 UTC
Created attachment 717690 [details]
rlImportAll.patch

rlImport should allow to import all libraries specified in Makefile as it is annoying to write down the libraries specs twice.

I have also fixed a bug in function __INTERNAL_extractRequires where grep was grepping wrong Makefile.

Comment 1 Petr Muller 2013-04-02 14:13:03 UTC
Thanks for the patch (and good catch with the makefile).

One thing I am not sure is this part:

-     | grep -E -o 'test\(/[^/)]+/[^/)]+/Library/[^/)]+\)' \
-     | sed -e 's|test(/[^/)]*/\([^/)]*\)/Library/\([^/)]*\))|\1/\2|g' \
+     | grep -E -o -e 'test\(/[^/)]+/[^/)]+/Library/[^/)]+\)' -e '[Ll]ibrary\([^)]*\)' \
+     | sed -e 's|test(/[^/)]*/\([^/)]*\)/Library/\([^/)]*\))|\1/\2|g' -e 's|[Ll]ibrary(\(.*\))|\1|' \

You have added second regex for something like "Library(Whatever)", why? What builds RPMs with such Provides?

Comment 2 Dalibor Pospíšil 2013-04-02 14:32:23 UTC
As we discussed that with psss it should be done in beaker-wizard which would produce Makefile with following line
	@echo "Provides:        library(<component>/<lib_name>)" >> $(METADATA)

This will help test writer to not maintain whole library path / task name. And use it as follows

	@echo "RhtsRequires:    library(<component>/<lib_name>)" >> $(METADATA)

Also this could be slitted into the separate patch.

Comment 3 Petr Muller 2013-04-02 15:09:30 UTC
Okay, I was not aware of that discussion. Sound good. No need for separate patch, I already did that with git :)

However, it seems to me that the grep regex should be more restrictive, currently it will match things like 'Library(fubar)' or even 'Library()' 


[Ll]ibrary\([^)]+/[^)]+\) ?

Comment 4 Dalibor Pospíšil 2013-04-02 15:22:53 UTC
I am ok with that. I did not handle that since there are some other checks in the code of rlImport so it was not crucial for me. Maybe we could even omit the '[Ll]' and leave just 'l'.

If you want to be more restrictive there could be even check for more slashes '/'. But still it seems to me that wrongly formated names are not destructive even if they are not catched by all the checks.

Comment 5 Petr Muller 2013-04-02 17:24:35 UTC
Hm, it's probably better to propagate the errors somewhere where they are actually logged. OK. I've just broken the patch in three separate ones (and I made a mistake, but the output is OK after all three of them :)

http://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=d739d33d46abe94a2b81935fa3a9dab7b88e97dc
http://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=b21c08d2bee7eb80d9f8dc7b03f0aae8d0511916
http://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=eea80e4ce9f910ce8a36fce5a322d0e5d4a36986

Comment 6 Fedora Update System 2013-04-30 15:12:50 UTC
beakerlib-1.7-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/beakerlib-1.7-1.fc19

Comment 7 Fedora Update System 2013-04-30 20:05:58 UTC
Package beakerlib-1.7-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing beakerlib-1.7-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7067/beakerlib-1.7-1.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-05-22 03:10:33 UTC
beakerlib-1.7-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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