[Top][All Lists]

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

[Chicken-users] More on Packaging eggs

From: Jim Pryor
Subject: [Chicken-users] More on Packaging eggs
Date: Sun, 12 Sep 2010 10:03:17 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

I've been making slow progress refreshing the Arch Linux package scripts
for installing eggs.

I've accumulated notes about metadata and installation bugs
in various eggs, which I will pass on soon.

I had written earlier about my puzzlement re the difference between
    CHICKEN_INSTALL_PREFIX=/altroot/usr chicken-install
    chicken-install -p /altroot/usr

I'm not sure anymore why I had been persuaded these work differently. As
far as I can now tell, they always work the same, as they're supposed to.

I think this is internally implemented using:
    (use setup-api)
    (destination-prefix "/altroot/usr")
and then can be retrieved using (installation-prefix). It's also honored
by the following formula:
    (include "setup-helper")
    (make-repository-pathname filename) ; instead of (make-pathname 
(repository-path) filename)
    (copy-to-repository filename) ; instead of (copy-file-to-directory filename 
    (copy-to-home filename) ; instead of (copy-file-to-directory filename 

I'm not aware of any other parts of the setup-api or setup-helper api
that are affected by the installation prefix setting.

Not every egg uses these bits of the api; so some eggs need their
installation scripts patched to work properly with our (and probably
most other) packaging systems. I'll report on these when I pass on my
bug list.

What explains many of the initial troubles I was having is that some
eggs don't honor the "-n / -no-install" option to chicken-install. They
attempt to install their files anyway (and some of these eggs attempt to
install in /usr (or whatever chicken-prefix is), even if the
installation prefix points elsewhere).

Other eggs do honor the -no-install option, but not in a way that I
expected. Our packaging system works best when the build and install
steps for a make sequence can be separated. Then the build step can be
scripted with user privileges, and the packaging-install step (into the package
system's "/altroot") happens under a fakeroot. (For the end-user to
actually install the package under "/" happens in a third step, and needs
root privileges. I'm not discussing this third, user-install step here.)

So I thought the typical egg's package script could look like this:

    build step:
        chicken-install -n  # do all the building

    packaging-install step:
       chicken-install -p "/altroot/usr"  # now do the installing

As I said, some eggs try to install at least some of their files even
when chicken-install is passed the -n flag. Let's ignore them for the
moment. Even the ones that would refrain from installing when passed the
-n flag are giving me no joy, because for the most part they're
RECOMPILING everything in the packaging-install step. So it looks like
in the usual case, I'm going to have to forego our packaging system's
separation of duties, and just do all the building and installing in the
packaging-install step. This is OK, though it's better to separate the
steps when it's feasible.

Just glancing at some of the build logs, it looks like sometimes
recompilation is avoided and other times not. I don't know whether
there's any reliable way to tell short of analyzing these build logs.

I did a fgrep on all the egg source files for invocations of the
setup-install-mode procedure, which reports the -n setting. I was
surprised to find it only in the source files for the crunch egg!

I thought perhaps handling of this option is buried in other parts of
the api, such as standard-extension. But only five eggs seem to use

So in fact I'm not even sure why so many eggs are even refraining from
installing when passed the -n option, since I can't see where their
setup scripts are even detecting the state of that option. Perhaps it's
buried in some other part of the API that they're using and I haven't
yet identified. (Do install-{extension,program,script} turn to NOPs when
chicken-install is invoked with the -n option?)

Jim Pryor

reply via email to

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