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: Sun, 3 Oct 2010 01:02:01 +0200
User-agent: Mutt/1.4.2.3i

On Sat, Oct 02, 2010 at 06:40:59PM -0400, Jim Pryor wrote:
> Hi Peter,

Hi Jim,

> I'm really not *that* knowledgeable about egg installation. But I have
> been writing packaging scripts for most of the eggs, for the Arch Linux
> user repository. From that experience, I got the following impressions:
> 
> 1. You're right, you shouldn't hard-code share/chicken/slatex in the way
> you do. But this would work instead:
> 
> -(define style-path
> -  (list (installation-prefix) "share" "chicken" "slatex"))
> +; also declare additional dependency on setup-helper
> +(include "setup-helper")
> +(define style-path
> +  (list (installation-chicken-home) "slatex"))

That's perhaps slightly better from a readability point of view, but
installation-chicken-home is just an alias for
{installation-prefix}/share/chicken so in reality all this does is
add a depedency on the setup-helper egg.

> 2. And that's where you should be copying your slatex.sty etc. files. Is
> it really true that files copied in that way don't get uninstalled by
> chicken-uninstall?

Yes, the install-* procedures register their files in a database.
Chicken-uninstall simply looks there and removes all registered items.
The procedure that does this (write-info) is not exported by the
setup-api, so this simply cannot be done from custom code.

> 3. However, please don't hard-code installation-prefix into the program.
[...]
> 
> When building a package, we run:
> 
>     chicken-install -p /some/fakeroot/usr
> 
> This installs all the egg's files underneath an (otherwise empty) fakeroot. 
> If the build step completes successfully, then the packaging system 
> compresses all the files in the fakeroot and wraps it as a binary package. 
> Later, the user can install that binary package and the files will then be 
> installed not underneath /some/fakeroot, but instead underneath the real root 
> /.

Looks like DESTDIR support. I will look into making it use chicken-home
tomorrow, instead.

> If both of these are legitimate uses of installation-prefix (and I certainly
> hope the second is; otherwise I see no good way to integrate the
> chicken-install system with our packaging system), then perhaps you
> should define two style-paths, one under installation-chicken-home, and
> the other underneath chicken-home.

Thanks for the valuable insights!

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]