"10" < "9": Get rid of string comparisons in time for F-10?

Hans Ulrich Niedermann hun at n-dimensional.de
Sun Jul 6 16:21:08 UTC 2008


Paul Howarth wrote:
> On Sun, 06 Jul 2008 15:02:52 +0200
> Hans Ulrich Niedermann <hun at n-dimensional.de> wrote:

>> Summary for 2008-07-06
>> ----------------------
>> devel:  58 string comparisons in 32 spec files
>> F-9:    78 string comparisons in 46 spec files
>> F-8:   109 string comparisons in 56 spec files
>> F-7:   118 string comparisons in 62 spec files

> Some false positives here:
> 
> lat
>     lat.spec:14:%if "%{?fedora}" == "5"
>     lat.spec:42:%if "%{?fedora}" == "5"
>     lat.spec:111:%if "%{?fedora}" == "5"
> 
> These are not a problem.

Technically speaking, they are not a problem, right. Until someone gets 
the idea that he wants >= instead of ==.

Whetever, strictly requiring a < or > in the conditional, the situation 
changes to the following:

Summary for 2008-07-06
----------------------
devel:  48 string comparisons in 28 spec files
F-9:    68 string comparisons in 42 spec files
F-8:    91 string comparisons in 53 spec files
F-7:    95 string comparisons in 58 spec files

Updated details, diagrams, etc. on
     http://ndim.fedorapeople.org/stuff/rpm/

-- 
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://lists.fedoraproject.org/pipermail/devel/attachments/20080706/e4301b64/attachment.bin 


More information about the devel mailing list