Re: Did i just made the fastest dependency checker in the world? (198 packages in 1.5 seconds)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-04-10 at 22:01 +0200, Mark wrote:
> so.. is mysql yust removing out those first 2 zero`s?... i`m having a
> hard time believing that..
> oke.. i wrote a tiny php script to make this clear:
> 
> <?php
> 
>     if (5.6 < 5.00504)
>     {
>         echo 'not what i would have expected<br />'; 
>     }
>     else
>     {
>         echo 'see, 5.00504 is smaller than 5.6 like i said<br />';
>     }
> 
>     if (1.1 == 1.01)
>     {
>         echo 'not what i would have expected<br />'; 
>     }
>     else
>     {
>         echo 'see, they 1.1 is not equal to 1.01<br />';
>     }
> 
> ?>
> 
> the result on my php (5.2.1) is: "see, 5.00504 is smaller than 5.6
> like i said" and "see, they 1.1 is not equal to 1.01"
> those are the facts that are gonna be used in the dep checker. though
> i will probably need to break the recursive loop quite a few time if
> those strange version numbers like 1.1b2 occur... 
> so jesse... how is your math going? ;)
> 

Mark, what people are trying to point out to you is that it doesn't
matter what php, mysql, you, jesse, or I think is a more recent version.
All that matters is what rpm thinks is a more recent version since rpm
is what will ultimately be managing the packages on the system.

Your two tests illustrate this problem.  The tests show that php has one
idea of what version is larger which will disagree with what rpm finds.
Therefore it will be returning wrong values.

-Toshio

PS: Your tests aren't accurately testing what php will need to check
either.  Your tests are using php floating point types but versions
(even without throwing rpm into the mix) aren't simple numbers.  2.10.1
vs 2.10.2 for instance.  And when you can compare those properly, try
comparing 2.10.1 vs 2.10.02.  And when you can compare those try
comparing 2.10.1beta1 vs 2.10.1... ad nauseum.

Attachment: signature.asc
Description: This is a digitally signed message part

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux