FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 05-23-2008, 11:00 PM
Hans Ulrich Niedermann
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

On #fedora-devel, the issue of comparing Fedora versions by string
comparison just came up. With F-10 on the way, this will be the first
time when string comparing versions will fail in a "10" < "7" way.


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?


--
Hans Ulrich Niedermann

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-26-2008, 09:51 PM
"Tom "spot" Callaway"
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

On Sat, 2008-05-24 at 01:00 +0200, Hans Ulrich Niedermann wrote:
> On #fedora-devel, the issue of comparing Fedora versions by string
> comparison just came up. With F-10 on the way, this will be the first
> time when string comparing versions will fail in a "10" < "7" way.
>
> 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.

~spot

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-27-2008, 09:02 AM
Hans Ulrich Niedermann
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

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

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 08:12 PM
Hans Ulrich Niedermann
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

Hans Ulrich Niedermann wrote:


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


Update from today's CVS:

devel: 75 string comparisons in 41 spec files
F-9: 83 string comparisons in 48 spec files
F-8: 114 string comparisons in 58 spec files
F-7: 118 string comparisons in 62 spec files

It's going in the right direction.

--
Hans Ulrich Niedermann

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-06-2008, 01:02 PM
Hans Ulrich Niedermann
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

A short reminder what this is about:

%if "%{?fedora}" > "7"
<something which should work in F-8, F-9, F-10, F-11, etc.>
%endif

This fails to work as intended in rawhide/devel/F10 and later and should
be fixed.


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

The packages in rawhide will definitely be affected by this, might
already be breaking stuff, and really should be fixed:


http://ndim.fedorapeople.org/stuff/rpm/string-comp-devel.log

Graphing the numbers over time shows a definite decrease in
devel/rawhide/F10, but nothing approaching zero for a long time:


http://ndim.fedorapeople.org/stuff/rpm/

--
Hans Ulrich Niedermann

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-06-2008, 02:29 PM
Paul Howarth
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

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

> A short reminder what this is about:
>
> %if "%{?fedora}" > "7"
> <something which should work in F-8, F-9, F-10, F-11, etc.>
> %endif
>
> This fails to work as intended in rawhide/devel/F10 and later and
> should be fixed.
>
> 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
>
> The packages in rawhide will definitely be affected by this, might
> already be breaking stuff, and really should be fixed:
>
> http://ndim.fedorapeople.org/stuff/rpm/string-comp-devel.log
>
> Graphing the numbers over time shows a definite decrease in
> devel/rawhide/F10, but nothing approaching zero for a long time:
>
> http://ndim.fedorapeople.org/stuff/rpm/
>

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.

Paul.



--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-06-2008, 03:13 PM
Nicolas Mailhot
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

Le dimanche 06 juillet 2008 à 15:29 +0100, Paul Howarth a écrit :

> 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.

Actually since FC5 has been EOLed for a long time, some legacy baggage
cleaning up is in order.

--
Nicolas Mailhot
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-06-2008, 03:25 PM
Peter Gordon
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

On Sun, 2008-07-06 at 15:29 +0100, Paul Howarth wrote:
> 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.
>
Maybe not, but FC5 is long-since dead. Conditional cruft like that
should probably just be outright removed.
--
Peter Gordon (codergeek42)
GnuPG Public Key ID: 0xFFC19479 / Fingerprint:
DD68 A414 56BD 6368 D957 9666 4268 CB7A FFC1 9479
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-06-2008, 04:08 PM
Hans Ulrich Niedermann
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

Nicolas Mailhot wrote:

Le dimanche 06 juillet 2008 à 15:29 +0100, Paul Howarth a écrit :


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.


Actually since FC5 has been EOLed for a long time, some legacy baggage
cleaning up is in order.


Well, it is still useful at least as documentation for people wanting to
build newer packages on older systems. Enterprise disto derivates, and
standalone lab boxes running Fedora spring to mind.


Apropos... I am not checking for improper %{epel} or %{rhel} usage, but
some spec files contain conditionals with them.


--
Hans Ulrich Niedermann

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-06-2008, 04:21 PM
Hans Ulrich Niedermann
 
Default "10" < "9": Get rid of string comparisons in time for F-10?

Paul Howarth wrote:

On Sun, 06 Jul 2008 15:02:52 +0200
Hans Ulrich Niedermann <hun@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

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 04:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org