[Rule-list] ANNOUNCE: first trial of rpm analyzer script

Marco Fioretti m.fioretti at inwind.it
Sun Jul 28 13:34:18 EEST 2002


Hello,

I have just uploaded at www.rule-project.org the pre-alpha version of
this tool: when given an rpm name (no version, like "bash") as second
argument, it tries to list all the RPMs one should install, starting
from nothing, to make that work.

URL:  www.rule-project.org/distro_analyzer_0.1.bz2
syntax: rpm_analyze <DB_FILE> <RPM_NAME>

DB_FILE: a file like rh7.3_all_cds (enclosed in the tarball) generated
by the other attached script, rpm_gen_db, by looking at all the
rpms found in the directory given as 1st argument.

I have chosen this approach, even it *is* ugly and *slower* compared
to the rpm based hypotheses discussed yesterday, because:

	1) it just came to me that way....
	2) it allows to build and use a <DB_FILE> from *any* combination of
	   rpms (CDs + a local directory with the ones you make for
	   yourself + (later) querying rpmfind.net ....)

		without having an RPM based system, or even any UNIX
		for that matter, just Perl
	3) It will eventually be able to analyze non RH systems: SuSE,
		Mandrake,... some day even Debian or Solaris, if it
                finds porters of the 1st script...

How it works:

rpm_gen_db creates Perl code to be evaluated by rpm_analyze

	For now please ignore it, just use the DB_FILE in the tarball to help
	me to debug on a common ground.

rpm_analyze executes the Perl code, and creates a CAPABILITY hash
listing all capabilities, who needs each, which package they come
from, by how many different packages they are needed, etc.. It then
gives a nested list of RPMs, example shown below: once we
get the subroutine generating that right, we can use it for
system-wide analyses.

Any feedback is WELCOME: test it on as many packages as you
can, and point out bugs here.
For example, why does it lists bash in its own dependencies?
Help!
Another thing it doesn't handle now is capabilities provided by more
(alternative) packages.

	Ciao, and thanks,
				Marco Fioretti

###############################################################

# marco >  ./rpm_analyze rh7.3_all_cds bash
bash
  compat-glibc
    db1
    db2
  glibc
    basesystem
      filesystem
      setup
    glibc-common
  glibc-debug
    glibc-devel
      glibc-kernheaders
        fileutils
        initscripts
          SysVinit
            pam
[rest of it snipped]
-- 
Excuse me for being greedy, but I want freedom and good government.
Both a flourishing economy and a well-cared-for earth. A society that
is diverse and communal.. that offers both privacy and accountability.
One that can afford a big conscience, along with lots of neat toys.
                             -- David Brin -- The Transparent Society 

_______________________________________________
Rule Project HOME PAGE:  http://www.rule-project.org/rule/
Original Rule Development Site http://savannah.gnu.org/projects/rule/Rule-list at mail.freesoftware.fsf.org
http://mail.freesoftware.fsf.org/mailman/listinfo/rule-list



This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here