[Top][All Lists]

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

Re: [Chicken-users] Installing data files for eggs

From: Jim Ursetto
Subject: Re: [Chicken-users] Installing data files for eggs
Date: Mon, 18 Oct 2010 19:37:51 -0500

On Sat, Oct 2, 2010 at 13:55, Peter Bex <address@hidden> wrote:
> Hi all,
> Is there a proper way to install data files from egg .setup-files?
> I couldn't find anything at
> so I rolled my own for the "slatex" egg:
> [...]
> The disadvantages are obvious: these files don't get uninstalled by
> chicken-uninstall and Chicken's data files aren't necessarily installed
> under $PREFIX/share/chicken  (the user can override $DATADIR on the Make
> invocation when building Chicken).

> So, I think it would be a good idea to add something like this to
> setup-api:

> (define style-path (data-path-for-extension 'slatex))
> (install-data 'slatex
>              '("slatex.sty" "slatex-chicken.sty" "cltl.sty")
>              `((version ,slatex-version))) ;; If this makes sense?

> The data-path-for-extension would return a unique directory for
> this extension in which it is free to dump its files.  I think this would
> make it easier to keep track of where everything is, especially if some
> extensions install a lot of files.

I am all for this because I am about to do something similar for
chickadee.  However a couple notes:
* you didn't use style-path in your example, was that intentional?
* I'd prefer it if install-data were able to install files into
arbitrary directories under the data path (because you might want to
create a tree, e.g. for a webserver root).  It might be ok to require
this tree to be mirrored from the source (e.g. "dir/slatex.sty" is
always installed in $DATADIR/slatex/dir/slatex.sty, not in an
arbitrary directory), because otherwise the syntax has to change.

This change is in "nice-to-have but not critical" status for me
because there are situations which it doesn't cover, for example
chicken-doc will install data files into the data directory but only
after install (so they cannot be tracked).  Maybe that is an abuse of
the data directory, I don't know.  What might be interesting (I am
about to get carried away) is a pre/post-remove mechanism that would
be called when you uninstall.

There is already a slight issue with installing different types of
files because the groups all have to be named differently, for example
'slatex (install-extension), 'slatex-cmd (install-program) and
'slatex-data (install-data).  Just pointing out for those unaware that
when you "chicken-uninstall slatex", it only uninstalls everything
because chicken-uninstall does a match on everything named *slatex*.
In fact there exist a few eggs which use identical group names and for
which chicken-uninstall won't uninstall everything.


reply via email to

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