By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2402 - Build issue: bibletime error on rpmlint
Summary: Build issue: bibletime error on rpmlint
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: non-core programs (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Francois Andriot
URL:
Depends on:
Blocks: R14.0.1
  Show dependency treegraph
 
Reported: 2015-03-21 11:30 CDT by Francois Andriot
Modified: 2015-03-23 18:42 CDT (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
bibletime: use strcmp instead of string comparison (1.21 KB, patch)
2015-03-21 11:31 CDT, Francois Andriot
Details | Diff
bibletime: use strcmp instead of string comparison (2) (1.21 KB, patch)
2015-03-21 16:36 CDT, Francois Andriot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Andriot 2015-03-21 11:30:10 CDT
Bibletime builds correctly on opensuse but fails at the rpmlint stage, because forbidden string comparison.
Comment 1 Francois Andriot 2015-03-21 11:31:04 CDT
Created attachment 2470 [details]
bibletime: use strcmp instead of string comparison

The attached patch makes rpmlint happy with the string comparisons.
Comment 2 Slávek Banko 2015-03-21 13:16:51 CDT
François, I believe that the patch causes a reversal of the sense of conditions.

Previous getGlobalOption( optionName(type).latin1() ) == "On" gives a 'true' if strings are identical. While strcmp if strings are identical gives '0' => therefore 'false'.
Comment 3 Francois Andriot 2015-03-21 13:22:52 CDT
AFAIK, in C++, "integer 0" translates to "boolean true", and "any integer other than 0" translates to "boolean false".

In shell scripting, it's the contrary ... "0" means "false" and "anything above 0" means "true".
Comment 4 Francois Andriot 2015-03-21 13:24:41 CDT
(In reply to Francois Andriot from comment #3)
> AFAIK, in C++, "integer 0" translates to "boolean true", and "any integer
> other than 0" translates to "boolean false".
> 
> In shell scripting, it's the contrary ... "0" means "false" and "anything
> above 0" means "true".

Oh no, it's precisely the contrary of what I said ... please ignore this comment, and yes, you're right, the patch probably does the contrary of expected behaviour.
Comment 5 Francois Andriot 2015-03-21 16:36:09 CDT
Created attachment 2471 [details]
bibletime: use strcmp instead of string comparison (2)

This patch should produce the expected behaviour.
Comment 6 Slávek Banko 2015-03-23 18:40:16 CDT
Comment on attachment 2471 [details]
bibletime: use strcmp instead of string comparison (2)

Pushed to GIT in hash a18630c3 (master) and 5ae4a0b3 (r14.0.x).