Subject: When to use pre-depends?

From: Guy Maor <[email-masked]>
Date: Thu, 5 Sep 1996 13:08:50 -0500 (CDT)

Is the essentialness of a package a sufficient condition for using
pre-depends?

Guy

---

From: [email-masked] (Kai Henningsen)
Date: 08 Sep 1996 13:28:00 +0200

> Is the essentialness of a package a sufficient condition for using

I would (naively?) think that pre-depends must be used if (and only if)  
the installation of the package, without having first completed  
installation of the dependency, would break the installation process.

That is, it should be used iff a simple depends won't do the right thing.

The difference in functionality between depends and pre-depends, as I  
understand it, are that a pre-depends guarantees that your package won't  
even be *unpacked* unless the pre-depends is already completely installed.  
On the other hand, a depends only guarantees that the other package will  
be completely installed before *configuration* of your package starts.

So - if unpacking your package before completely installing the dependency  
will break, then you obviously need pre-depends.

For example, IIRC, an elf dpkg needs a pre-dependency on libc5 for that  
reason - unpacking a new elf dpkg over an a.out dpkg without having a  
functioning libc5 means a completely broken dpkg - desaster!

On the other hand, unpacking an elf editor in the same situation means  
that while your editor is now broken, you can still use dpkg to install  
the library. A simple depends will obviously DTRT here.

Now, Ian, how badly did I miss the point?

MfG Kai

---

From: Guy Maor <[email-masked]>
Date: Thu, 12 Sep 1996 14:52:55 -0500 (CDT)

> be completely installed before *configuration* of your package starts.

That's correct.

Pre-depends and essentialness are different things.  The first prevents
a package from existing in an unconfigured state (when dependencies
might not be satisfied).  The second prevents a package from being
removed.

In both cases the intent is the same: there should *always* be a
working version of the package installed.  So very few packages should
have one without the other.  A quick script gives:

adduser ess but not pre-dep and has dep
at pre-dep but not ess
libc5 pre-dep but not ess
modules pre-dep but not ess
ncurses3.0 ess but not pre-dep and has dep
perl pre-dep but not ess

All but two of these should have both or neither.  The only that look
correct are perl, because base includes a stripped version, and libc5,
which requires a working ld.so, but might be removed in favor of
libc6.

Note that packages in base are *not* automatically essential.  The key
point here is that the system is unusable, not hard to use.

Guy