Version 5 of Ultimate Package Blast-o-rama

Updated 2009-11-10 01:45:49 by CMcC

Goals

To be the best package management system ever. To change the nature of package creation/distribution. To simplify all aspects of the process of writing and disseminating a library. To speed up parts of the system that are slow.

Subgoals for package writers

It should be easy to submit a package to the repository.

Subgoals for application writers

It should be easy to access a package listed in the repository. The repository should handle dependencies automatically.

Subgoals for end-users

It should be faster than the current tcl library load times. Root access shouldn't be necessary to add packages to one's local set of packages.

First cut at code

[package require Package]

The code is here: http://code.google.com/p/wub/source/browse/trunk/Utilities/Package.tcl

It completely replaces package with a version which tracks additions to (note: not subtractions from) ::auto_path. First time it ever runs it creates a database under ~/.tclpkg into which it stores all the packages it finds. Thereafter, it satisfies all [package require] calls from that database, never traversing the filesystem again, unless and until ::auto_path changes to include a new, as yet unseen, directory.

This is faster than filesystem traversal, and provides a centralised database of all known/seen packages. This speed comes at a cost, of course: changes to the underlying file system will *not* be noticed by or reflected in Package. As things stand, the database would have to be removed to reflect these changes when it is automatically rebuilt.