Bug 1150672

Summary: rlIsRhel '>5' not working
Product: [Fedora] Fedora EPEL Reporter: Ondřej Pták <optak>
Component: beakerlibAssignee: Dalibor Pospíšil <dapospis>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: el5CC: dapospis, pmuller, psplicha
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: beakerlib-1.10-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-17 05:34:52 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:

Description Ondřej Pták 2014-10-08 15:50:24 UTC
Description of problem:
rlIsRhel '>5' on rhel-5 shoud return 0, but currently return 1

Version-Release number of selected component (if applicable):
beakerlib-1.9-5.el5

How reproducible:
Always on RHEL-5

Steps to Reproduce:
1. source /usr/share/beakerlib/beakerlib.sh
2. rlIsRHEL '>5' && echo FAIL || echo PASS

Actual results:
FAIL

Expected results:
PASS

Additional info:
I was unable to reproduce this on F20 with rlIsFedora '>20' (beakerlib-1.9-3.fc20)

Comment 1 Ondřej Pták 2014-10-08 15:52:12 UTC
Wrong description in 1st comment, correct is:
rlIsRhel '>5' on rhel-5 shoud return 1, but currently return 0

Comment 2 Dalibor Pospíšil 2014-10-08 16:00:54 UTC
Apparently the problem is limited to bash v3. While on newer versions [[ "5" =~ \. ]] returns 1, on bash v3 it needs to be [[ "5" =~ \\\. ]].
Compatible solution seems to be [[ "5" =~ [.] ]].

Comment 4 Fedora Update System 2014-10-08 18:04:16 UTC
beakerlib-1.9-6.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/beakerlib-1.9-6.el5

Comment 5 Fedora Update System 2014-12-01 15:54:06 UTC
beakerlib-1.10-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/beakerlib-1.10-1.el5

Comment 6 Fedora Update System 2014-12-17 05:34:52 UTC
beakerlib-1.10-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.