Bug 910757
Summary: | New function rlAssertBinaryOrigin | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Petr Šplíchal <psplicha> | ||||||||||||||||
Component: | beakerlib | Assignee: | Martin Kyral <mkyral> | ||||||||||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||
Severity: | high | Docs Contact: | |||||||||||||||||
Priority: | high | ||||||||||||||||||
Version: | rawhide | CC: | ohudlick, pmuller, psplicha | ||||||||||||||||
Target Milestone: | --- | Keywords: | FutureFeature, Patch | ||||||||||||||||
Target Release: | --- | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Whiteboard: | |||||||||||||||||||
Fixed In Version: | beakerlib-1.7-1.fc19 | Doc Type: | Enhancement | ||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||
Clone Of: | Environment: | ||||||||||||||||||
Last Closed: | 2013-05-22 03:20:17 UTC | Type: | Bug | ||||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||
Embargoed: | |||||||||||||||||||
Attachments: |
|
Description
Petr Šplíchal
2013-02-13 13:47:11 UTC
Please, make sure this works with alternatives as well. Created attachment 697868 [details] proposed patch the patch solves also BZ#772622 Created attachment 699387 [details]
tests for the new functionality
Created attachment 699498 [details]
proposed patch
Created attachment 699499 [details]
tests for the new functionality
Fixed rlAssertBinaryOrigin so it returns the actual status code Created attachment 700562 [details]
proposed patch
Merged the src and test patches, only binary is mandatory argument for rlAssertBinaryOrigin
Tested patch from the comment #7 applied on beakerlib-1.6-1.el6eso.noarch: Works both for "normal" and alternatives handled binaries. If not package name is supplied, the content of the PACKAGES environment variable is used. The documentation needs a little fix, Martin has been already notified. Created attachment 702794 [details]
proposed patch
Documentation fixes
Both the functionality and the documentation is good from my POV. This has not been yet committed to the git repo, moving to ASSIGNED. https://fedorahosted.org/beakerlib/wiki/CodingStyle#BugzillaStates Petr, could you have a look at this? It's blocking parametrization. I've looked briefly through the sources, it looks generally fine. I'm just not sure about the following line: BINARY=$(ls -l $(which $CMD) | awk '{ print $NF }') What about using readlink here instead? Last thing: It's probably better to use rlLogInfo/rlLogError when reporting additional information rather than simply: echo "$CMD: command not found". (In reply to comment #10) > Both the functionality and the documentation is good from my POV. Taking back the 'functionality' part. It *doesn't* work when there are more levels of symlimks. E.g. /usr/bin/XXX -> /etc/alternatives/XXX-provider -> /etc/alternatives/XXX-provider-internal -> /usr/share/provider/bin/XXX In that scenario the proposed patch doesn't find the final destination and tries to assert a symlink - which fails. Is there any reason why readlink command cannot be used? It would work correctly that way. Created attachment 704988 [details]
proposed patch
* using readlink
* minor fixes
Thanks for the patch, Martin. Pushed to git: http://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=f4163cb beakerlib-1.7-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/beakerlib-1.7-1.fc19 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). 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. |