"10" < "9": Get rid of string comparisons in time for F-10?
Hans Ulrich Niedermann
hun at n-dimensional.de
Tue May 27 09:02:09 UTC 2008
Tom "spot" Callaway wrote:
> On Sat, 2008-05-24 at 01:00 +0200, Hans Ulrich Niedermann wrote:
>> The case in question was a classic older %if "%{?fedora}" > "7", which
>> should be changed to %if 0%{?fedora} > 7, as Rex Dieter and Christopher
>> Stone have pointed out:
>> http://fedoraproject.org/wiki/Packaging/DistTag#head-1c550109af0705ccb71329619b99428af2fd3e25
>>
>> Where else but in spec files may similarly wrong string comparisons be
>> happening? Is a systematic effort required to fix these comparisons in
>> the run-up to F-10?
>
> Probably. This is something we should look into, and I've added it to my
> todo list.
My quick and dirty spec file string comparison checker script is at:
http://ndim.fedorapeople.org/stuff/rpm/string-comparison-check.sh
Log files for devel, F-9, F-8, F-7 branches:
http://ndim.fedorapeople.org/stuff/rpm/string-comp-devel.log
http://ndim.fedorapeople.org/stuff/rpm/string-comp-F-9.log
http://ndim.fedorapeople.org/stuff/rpm/string-comp-F-8.log
http://ndim.fedorapeople.org/stuff/rpm/string-comp-F-7.log
To give a rough idea of the scale:
devel: 85 string comparisons in 46 spec files
F-9: 90 string comparisons in 50 spec files
F-8: 117 string comparisons in 59 spec files
F-7: 121 string comparisons in 63 spec files
If someone wants to do mass bug filing or reporting sorted by maintainer
name based on that, you'd probably need to filter out a few cases where
this simple grep finds false positives. The == and != comparisons might
be working as intended.
--
Hans Ulrich Niedermann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20080527/1e790011/attachment.sig>
More information about the fedora-devel-list
mailing list