How to handle ipkg OFFLINE_ROOT mode

From: Carl Worth <cworth.a.t.east.isi.edu>
Date: Wed Feb 27 2002 - 15:05:38 EST

So, the new ipkg is coming along quite nicely, (if you check the
latest bits out of CVS, you can play with "ipkg install" and "ipkg
remove" of some packages).

I'm now starting to turn on the pre/post script support and I am
trying to decide how to implement things to satisfy:

        Bugzilla Bug 97
        ipkg should chroot before running postinst etc when installing
        offline (http://handhelds.org/bugzilla/show_bug.cgi?id=97)

The chroot is very attractive for putting all the files/directories in the
same place that the scripts expect them, but it is not so nice if we
want to run ipkg in OFFLINE_ROOT mode on a machine of a different
architecture than the machine which we are targeting. And this is a
feature I would really like to preserve if at all possible.

So, thinking out loud here:

As long as the only binary dependency that the scripts have is the
interpreter, I guess it would be possible for ipkg to install its own
interpreter temporarily into the chroot-jail and invoke it on the
scripts.

Then, perhaps we can come up with some mechanism by which packages
with additional binary dependencies in their scripts could publish
that fact. And for any such packages, ipkg could leave the packages in
a "needs-configuration" state and run their scripts when the native
system was up an running?

Or, maybe all scripts could be postponed until the native system was
up and running? (Not so good for using update-alternatives for
essential things like /bin/sh though. Also, this would not work for
packages with preinst scripts, so I guess those would be precluded
from offline_root installation).

Or, as I alluded to earlier, another option is to restrict
offline_root mode to only be used on a machine of the same
architecture as the packages being installed.

I hope someone has some good ideas out there. Can't wait to hear em.

-Carl

-- 
Carl Worth                                        
USC Information Sciences Institute                 cworth@east.isi.edu
3811 N. Fairfax Dr. #200, Arlington VA 22203		  703-812-3725
Received on Wed Feb 27 20:05:45 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:37:20 EDT