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

dpkg, ELF, upgrade order, broken systems



I propose to introduce a new feature into dpkg shortly.  It will
hopefully make it much harder to break your system while attempting an
ELF upgrade.

The feature will be invoked by a `Pre-Depends' control file line,
which has the same syntax as a Depends line.  The effect will be for
dpkg to refuse to unpack a package if the pre-dependency is not
satisfied.

Usually a dependency is only considered satisfied if the depended-on
package is both installed and configured; a pre-dependency will be
also considered satisfied if the depended-on package is unpacked or
half-configured, provided that it was previously properly configured.
If the pre-dependency includes a version specification then both the
version installed and the previously-configured version must satisfy
the version specification.

This can be used by base packages which need the new ELF libc (so that
your ls, bash or dpkg doesn't get replaced by an ELF version until the
libc and ld.so are installed), or by any package which needs features
from a particular dpkg version.

IT SHOULD NOT BE USED BY ANY OTHER PACKAGES.  This is because it
imposes an installation order, which is complicated to deal with for
dselect methods and users.

The Pre-Depends line will appear in the Packages files, where dselect
methods can use it to ensure that the packages are fed to dpkg in the
right order (though support for this may be a little while coming).

There will be a `dpkg --assert-pre-depends' option, which packages
using Pre-Depends should use in their preinst so that the installation
will fail if an insufficiently early dpkg version is used.

Comments, anyone ?

If not then I'd appreciate it if base packages started having
Pre-Depends lines added; we can add the --assert-pre-depends later.

Ian.


Reply to: