Bug 1214190
| Summary: | Add rlIsCentOS to do the right thing on CentOS, similar to rlIsRHEL | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan Pazdziora (Red Hat) <jpazdziora> | |
| Component: | beakerlib | Assignee: | Ales Zelinka <azelinka> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 24 | CC: | azelinka, dapospis, fsumsal, jprokes, mkyral, ohudlick | |
| Target Milestone: | --- | Keywords: | Patch | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | beakerlib-1.13-1 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1214412 (view as bug list) | Environment: | ||
| Last Closed: | 2017-02-16 08:48:27 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1173652, 1173650, 1214412 | |||
|
Description
Jan Pazdziora (Red Hat)
2015-04-22 08:20:49 UTC
patch adding rlIsCentOS on review: https://git.fedorahosted.org/cgit/beakerlib.git/commit/?h=devel&id=cce2b41b68f9b0559d4f58d01edd5407ee70f77e (In reply to Ales Zelinka from comment #1) > patch adding rlIsCentOS on review: > > https://git.fedorahosted.org/cgit/beakerlib.git/commit/ > ?h=devel&id=cce2b41b68f9b0559d4f58d01edd5407ee70f77e This is bad: - if [[ "$arg" == "$major" || "$arg" == "$whole" ]] + if [[ "$whole" =~ ^${arg}.* ]] (In reply to Dalibor Pospíšil from comment #2) > This is bad: > - if [[ "$arg" == "$major" || "$arg" == "$whole" ]] > + if [[ "$whole" =~ ^${arg}.* ]] um, why? What did I miss? (In reply to Ales Zelinka from comment #3) > (In reply to Dalibor Pospíšil from comment #2) > > > This is bad: > > - if [[ "$arg" == "$major" || "$arg" == "$whole" ]] > > + if [[ "$whole" =~ ^${arg}.* ]] > > um, why? What did I miss? # whole=5.10 # arg=5.1 # [[ "$whole" =~ ^${arg}.* ]]; echo $? 0 BTW, what was wrong on the old one? I see, that is a bug.
> BTW, what was wrong on the old one?
It assumed that $whole - $major = $minor which is incorrect for CentOS7.1 because it has 3rd number in the release (7.1.1503).
I'll just rewrite the function to use proper $major $minor parsing instead of the $whole thingie.
(In reply to Ales Zelinka from comment #5) > I see, that is a bug. > > > BTW, what was wrong on the old one? > > It assumed that $whole - $major = $minor which is incorrect for CentOS7.1 > because it has 3rd number in the release (7.1.1503). > > I'll just rewrite the function to use proper $major $minor parsing instead > of the $whole thingie. rlTestVersion is able to handle unlimited number of dots. The problem comes to play if we want to compare just at the level of minors or in this case possibli lower. I think it would be nice to implement some universal approach, like to cut content of whole to match expected number of dots... This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase |