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

Re: cross-dpkg problems

On Fri, Nov 06, 1998 at 05:27:26PM -0500, Roland McGrath wrote:
> > The installation process is a bit difficult. There are four scripts,
> > {pre,post}{rm,inst} which are run before and after removal or installation
> > of packages. The scripts are run with an argument, which defines if it is an
> > upgrade, a new install, a removal or purge (removes configuration too) etc.
> What sorts of things are done be these preinstall scripts?

There are different cases where a preinst is needed (not every package has
it) [then list may be far from complete]:

1) You have a link on the system you want to remove before the package is
2) You have f*cked up completely in a prior package and needs to fix it
   before the package is upgraded.
3) If you want to move things around (configuration files), sometimes a
   preinst is necessary.
4) You need to assure that all "predepends" are fulfilled (packages which
   must be installed before this package may even be unpacked). This is
   necessary for some base packages.

> Can they be bypassed?

I am not sure what you mean. I'mnot sure if there is an option for dpkg to
not run them. You could write a small script which removes the scripts from
the package before installation.

In an initial install, Debian (the base floppies)
just unpack a tar file. We essentially want to do the same.

> Is it safe to say that they won't be required if installing onto
> an empty filesystem where we can say a priori there is nothing conflicting
> or relevant already installed?

Yes. For this, we should investigate the boot-floppy package, which builds a
tar file for initial install. This may be easier than reinventing the wheel.
> > If the postinst fails, the package is left in a "half-installed" state.
> > Running "dpkg --pending --configure" after reboot will do what you want.
> > There are other options, for a fine adjustment of dpkg's behaviour.
> > You can also only unpack the files, which is sometimes dangerous (in
> > a running system, at least :)
> I'm glad to hear it is flexible in these ways.  I think what we should
> recommend for people installing a hurd system from another system is the
> dpkg command that does this "half-install" without even trying to run the
> post-install scripts (so people don't get strange errors and core dumps and
> whatnot).

I'm not confident that there is such an option. Currently, my native hurd
packages (hurd, gnumach, glibc2) don'ßt have any install scripts, so they
work without errors.

>  Then we can hopefully eventually replace the hurd "SETUP" script
> one runs on first boot with just "dpkg --pending --configure", or something
> like that.

This will be the effect. However, using the boot floppies and then running
dpkg to install the rest of the distribution may be the better approach.

For the boot floppies to work, we need a Hurd system on floppy. Or we
install the Hurd from a Linux system on floppy.
> We still need to figure out the pre-install script issue.  But I think it
> would be a good feature for dpkg in general to be able to do pure
> cross-system installs in this way without attempting anything that needs to
> be run on the target system, so I would like to see a general resolution to
> this question rather than just getting by for the hurd.

Mmmh. Why would you want to do that? The preinst script is not there for
fun. They contain important adjustments, that MUST be executed before even
unpacking the files (during an upgrade). Everything that can be configured
after unpacking is in the postinst script. So, as soon as the base system
is ready, one would use the native dpkg to install packages, and not the Linux dpkg.


"Rhubarb is no Egyptian god."        Debian GNU/Linux        finger brinkmd@ 
Marcus Brinkmann                   http://www.debian.org    master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09

Reply to: