chicken-users
[Top][All Lists]
Advanced

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

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


From: Peter Bex
Subject: Re: [Chicken-users] Installing data files for eggs
Date: Tue, 19 Oct 2010 16:52:19 +0200
User-agent: Mutt/1.4.2.3i

On Mon, Oct 18, 2010 at 07:37:51PM -0500, Jim Ursetto wrote:
> > 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?
>
> 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?

Yeah, the idea is that you put the former in your program and the latter
in the setup-file.  The program still needs to find the installed files,
after all ;)

> * 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.

100% agreed

> 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.

Yeah, I was thinking the same thing. But then you quickly get into
slippery terrain; when does it stop being a simple tool to install
Chicken extensions and start being a full-blown package manager?
Felix has always said that chicken-install etc shouldn't be a full
package management tool, but it's starting to look like one more and
more as we write more and more different kinds of eggs with different
needs.

> 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.

That sucks :(

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

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