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

seth vidal skvidal at linux.duke.edu
Mon Apr 9 21:40:03 UTC 2007


On Mon, 2007-04-09 at 23:34 +0200, Mark wrote:
>         Does your provides database include every file provided by
>         every
>         package?
>         
>         so that if you encounter: 
>         
>         Requires: /some/path/to/a/file
>         
>         it can resolve it?
> 
> if there is another package that has "/some/path/to/a/file" in it`s
> Provides i can resolve it. otherwise i can`t. (yet)
> 
>         also how are you doing your versioned-dep calculation? Are you
>         calling
>         out to rpm for the rpm version comparisons?
> 
> that`s not that hard at all.
> i just have a table with the package id, package provides/requires and
> the version of the requires/provides though this can use some
> tweaking.
> 
>         how are you checking to see if the package foo-1.3-1 provides
>         that
>         dependency or not?
> 
> to put it simple:
> SELECT * FROM PROVIDES WHERE provide_id = '##' AND provide_name =
> 'foo-1.3-1'; 
> (simple sample.. it`s not the query that i actually use.. that`s alot
> longer :P) 


That won't work.

That only checks for the precise provide, not for the ranges.

example:

bar requires foo > 1.1

you only have foo 1.3

now, implicitly in the above is that foo 1.3 fulfills the dep of foo >
1.1

So you have to check to see that the ranges overlap.

Do you understand now?

-sv





More information about the devel mailing list