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

dragoran dragoran drago01 at gmail.com
Tue Apr 10 20:10:16 UTC 2007


On 4/10/07, Mark <markg85 at gmail.com> 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 />';
>     }
>
> ?>



it was not about 1.1 and 1.01 but 1.10 should be bigger than 1.1 (which is
the same if you do == )
this can be solved if you split the version string and compare each part
(explode() )


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? ;)
>
> 2007/4/10, Jesse Keating <jkeating at redhat.com>:
> >
> > On Tuesday 10 April 2007 14:49:14 Mark wrote:
> > > Which is smaller: 5.6 or 5.00504?
> > >
> > >
> > > i would say that 5.00504 = smaller than 5.6 though i`m not sure if
> > mysql
> > > thinks the same..
> >
> > Actually, 5.6 is smaller.  5 and 5 is compared, then 00504 and 6 is
> > compared.
> > 00504 actually becomes 504 which is higher than just 6 and thus wins.
> >
> > --
> > Jesse Keating
> > Release Engineer: Fedora
> >
> > --
> > fedora-devel-list mailing list
> > fedora-devel-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/fedora-devel-list
> >
> >
>
> --
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/devel/attachments/20070410/24e507bc/attachment-0002.html 


More information about the devel mailing list