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

Matthias Saou thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Wed Apr 11 08:55:39 UTC 2007


Mark wrote :

> you can say that (last part) again... it could take a long while till it`s
> done.. considering that i just know what pointers are in c++ and besides the
> pointers i know a few other basics but nothing interesting enough to be able
> to make this stuff in c++ and that`s the exact reason why i`m first making
> it in php.

Then you definitely want to start by coding a PHP module in C which
would wrap around rpmlib. You could then map rpm files to objects in PHP
to get all the info you need from the rpm files (requires and provides
as well as file lists for instance) and obviously create useful
functions, of which the first one could be to compare versions... and
would be 100% accurate since it would be using rpm's internal version
comparison.

PHP5 is now also quite good at parsing XML, so playing with repodata
shouldn't be hard either.

Good luck! :-)

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora Core release 6 (Zod) - Linux kernel 2.6.20-1.2943.fc6
Load : 0.59 0.57 0.55




More information about the fedora-devel-list mailing list