octave-maintainers
[Top][All Lists]
Advanced

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

package system


From: John W. Eaton
Subject: package system
Date: Tue, 9 May 2006 13:55:27 -0400

Sorry for the delay in doing anything about the package system.  I'm
ready to include it in the Octave archive CVS now with a few changes.

In the 0.2.1 version of the package code (is this the latest, or have
there been any changes?) we have

  get_unsatisfied_deps.m
  install.m
  installed_packages.m
  load_packages.m
  uninstall.m

I'd like to make everything a "private" function except something like
"pkg" or "package" which would then be called by users like this:

  pkg list
  pkg list-installed
  pkg show
  pkg install pkg_1 pkg_2
  pkg remove

etc.  The pkg function would be implemented using functions based on
what we currently have.  For example,

  __pkg_list__ ();
  __pkg_list_installed__ ();
  __pkg_show__ (pkg_1, pkg_2, ...);
  __pkg_install__ (ignore_deps, pkg_1, pkg_2, ...);
  __pkg_remove__ (ignore_deps, pkg_1, pkg_2, ...);

The package-0.2.1 directory also includes rm_rf.m and untar.m.

Perhaps the untar function should be converted to a generic "tar"
function?  Or we could just have a specialized __pkg_unpack__ function
that does just enough to implement unpacking of the package files.

The rm_rf function makes me nervous because I imagine some luser
installing precious files inside a package directory and then removing
the package later and blaming us for wiping out decades of valuable
work.  Or, disaster could strike if a bug caused a bad directory name
to be passed in (rm_rf ("/") --- oops!).  So I think it would be
better for each package to contain an explicit list of files and then
we would only delete those files from the installation directory.  We
could remove plain files first, then remove directories with rmdir and
issue a warning if the directory can't be removed because it is not
empty.  For the plain files, we could keep a checksum and only remove
unmodified files.

Comments?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]