Bug 1011452 - rlIsRHEL: Space between arguments handled badly
rlIsRHEL: Space between arguments handled badly
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Muller
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: 1108730 Fedora-beakerlib-1.9-3 1116317
  Show dependency treegraph
Reported: 2013-09-24 06:17 EDT by Petr Muller
Modified: 2016-09-19 22:10 EDT (History)
3 users (show)

See Also:
Fixed In Version: beakerlib-1.9-3.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1108730 (view as bug list)
Last Closed: 2014-07-30 02:57:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix (2.68 KB, patch)
2013-09-24 06:17 EDT, Petr Muller
no flags Details | Diff

  None (edit)
Description Petr Muller 2013-09-24 06:17:39 EDT
Created attachment 802144 [details]

Description of problem:

>> search your tests[1] for incorrect usage of rlIsRHEL/rlIsFedora. If
>> you use rlIsRHEL/rlIsFedora with prefix consisting of ’<’, ’<=’, ’=’,
>> ’>=’, ’>’ there needs to be no space between this prefix and version
>> number or this command use silently returns true.
>> [1] $ grep -P -r "(rlIsRHEL|rlIsFedora)(\d|\s)+['\"\\][<=>]+['\"]?\s"
>> /mnt/tests
>> Have a nice day,
>> -- Lukas -krtek.net- Novy BaseOS Security QE
> That's IMO a bug in BL. Attached is a patch (+tests).

I agree that the bug is an incorrect sanity check (which your patch
fixes), the "no space" behavior is however a feature as the following
is a valid scenario:

    rlIsRHEL '<=5' 6.2 6.4 '>=7'

The manpage could probably use some examples as well.

as for test_rlIsRHEL, we should probably test two-digit numbers as well,
like 5.10.
Comment 2 Fedora Update System 2014-06-17 09:41:25 EDT
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20.
Comment 3 Fedora Update System 2014-06-17 19:28:56 EDT
Package beakerlib-1.9-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing beakerlib-1.9-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2014-07-02 04:01:06 EDT
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20.
Comment 5 Dalibor Pospíšil 2014-07-04 04:51:00 EDT
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed.

Fixed in:
Comment 6 Fedora Update System 2014-07-17 09:15:34 EDT
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20.
Comment 7 Fedora Update System 2014-07-30 02:57:05 EDT
beakerlib-1.9-3.fc20 has been pushed to the Fedora 20 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.