Re: pkg_tool dependency scanner for the gnome2 packages



Ps, i forgot to mention,  i intend to add a transaction table to it tomorrow
which will translate it from pkg_config names to RPM style names (ie
gobject-2.0 to 'glib2').. this is the final part that needs to be done
before its in fully reusable state.

Also, if you wish to run the tool, make sure you have 'php', (might have to
change generate.php from #!/usr/local/bin/php to /usr/bin/php), and chmod +x
generate.php. When running it, it will look for ./configure.in files in all
subdirs of the current directory..


    -- Chris



----- Original Message -----
From: "Chris Chabot" <chabotc reviewboard com>
To: <gnome-packaging-list gnome org>; <gleblanc linuxweasel com>
Sent: Wednesday, January 23, 2002 1:02 AM
Subject: pkg_tool dependency scanner for the gnome2 packages


> As promised, ive code a quick&dirty tool that scans ./configure.in files
> for PKG_CHECK_MODULE tags, and extracts the package's dependencies that
> it defines.
>
> This should give us a prety good and relativly complete start on
> defining dependencies for our .spec files, etc. Also, most of the time
> the info in these configure.in files is more acurate then what we use in
> .spec files.
>
> The code is a horification become reality, i know... I thought 'simple'
> tokenized scanning would be enough to extract these tags, however the
> consitency in the configure.in files in how they define those
> pkg_check_modules is very poor, if present at all.
>
> Thus i had to write a basic M4 code parser (weird dialect that is btw),
> which could detect variables, strings, comments, etc... It's nothing
> fancy, except that it has a basic knowledge of the tokens used in those
> M4 scripts, and what kind of comments / strings blocks it uses.
>
> Since writing of this basic parsing took more time then expected, i
> decided to make a -clean- basic m4 parsing class (m4parser.php) with
> small pieces of comments and examples, so that could be reusable ;-) All
> the dirty work is done in a seperate file (generate.php).
>
> A bit of cleaning will be required to clean up it's output and fix the
> last 2 mis-diagnostics of variable names, but its quite usable already.
>
> Below is the output of the program, you can use this already to fill in
> the dependencies of the .spec files, and attached are the 2 PHP scripts
> which do the scanning. (Since coding time was a lot more sparse then CPU
> time, i decided to use a simple scripting language, so it eats all your
> CPU cycles for a couple of minutes, and use upto 5 megs of memory ;-)
>
> Enjoy!
<truncated>




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