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

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



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?

i get it now :) i didn`t even thought about that one.

What Seth is getting at is that this is harder than you think. Once you
start doing it in the complete way (which is required for correct answers),
you'll loose speed.

is there anything more to check besides the requires and provides with the versions?
because if the version thing is all that needs to be fixed (besides cross checking the already installed packages) than the speed will get lower but still well below a second (for mysql) i think 0.002 :P and this is with tables that have over 40.000 entry's!! (the first time i even work with tables that big

hmm.. it will get complex if you also want things like:
Foo is installed, but has version 1.1
Bar requires Foo version 1.3. Do you want me to update Foo?

and for those paths.. is it possible that no package provides the path but that it`s already installed (so simply not in the provides list) if that`s the case the final c/c++ script will have to work together with slocate.. and when a slocate database isn`t made yet (with updatedb) it will take alot of the speed...or not... first load some stuff in the memory, than run updatedb and while that`s running do the calculations on the things that are stored in the memory.. the idea`s keep comming :P


And to make sure i have the right idea..
imagine i want to instakk "FooBar" than the actions i need to do are:

1. first check what`s needed (with versions)
2. cross reference (1) against the currently installed packages (with versions)
3. Check for avalible updates on (1) (versions only)
4. install all: new packages, updates and install for dependency

right?


2007/4/9, Matthew Miller < mattdm mattdm org>:
On Mon, Apr 09, 2007 at 11:34:23PM +0200, Mark wrote:
> 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.

What Seth is getting at is that this is harder than you think. Once you
start doing it in the complete way (which is required for correct answers),
you'll loose speed.


> 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

How do you know if version 1.3 is greater or less than epoch 1 version 1.2?

--
Matthew Miller           mattdm mattdm org          <http://mattdm.org/>
Boston University Linux      ------>              < http://linux.bu.edu/>

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


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