[Starkit] filleting tcllib
Andreas Kupries
andreask at ActiveState.com
Wed May 4 09:50:00 CEST 2005
> > > Has anyone given any thought to a method for filleting tcllib, i.e.
> > > specifying a list of packages known to be required, and ensuring that
> > > those packages plus all dependencies are extracted and placed
> > > appropriately in a .vfs tree? Doing it by hand is moderately
> > > painful, and I wonder if some clever use of [package ifneeded],
> > > perhaps grabbing all the pkgIndex.tcl files and programmatically
> > > rewriting them to replace the "source [file join...." element with a
> > > "[file copy..." or two might be a way forward.
> > >
> >
> > Most of the time I only need one or two packages and figuring out
> > which to include has been relatively simple sofar.
> >
> > Perhaps rather than a programmatic solution, we should provide
> > a chart depicting which packages are required by which others?
>
> I suppose what I am saying is that it's getting to the point with some
> of our work where figuring out what to include is not so simple, but
> considered use of the pkgIndex.tcl files and perhaps grep'ing for
> package require lines might yield a tool of use to several if not
> many (not limited just to tcllib, of course).
The SAK tool in Tcllib (sak.tcl in the toplevel directory) provides some
functionality which require it to scan package index files, and general Tcl
code. SAK is interested in the version data, for status reports, and
vlaidation that package code and index are in sync, and things like that.
This code could possible be factored out of sak and put into its own package
(in tcllib :), and then enhanced to scan for require statements in the
package sources as well. This is possible even if the code and enhancement
is not placed into a package, and can then serve as another subcommand for
sak which either spits out the direct dependencies for all packages, or the
closure of dependencies for a list of packages.
Another functionality which can/should be added to SAK and/or installer is
generation of Tcl Modules as a new method of installing Tcllib.
--
Andreas Kupries <andreask at ActiveState.com>
Developer @ http://www.ActiveState.com, a division of Sophos
Tel: +1 604 484 6491
More information about the Starkit
mailing list