Package: multistrap
Version: 2.2.9
Severity: normal

multistrap appears to not follow the Debian policy when dealing with preinst
scripts.

https://www.debian.org/doc/debian-policy/#summary-of-ways-maintainer-scripts-are-called
> The package will not yet be unpacked, so the preinst script cannot rely onn
> any files included in its package

However, if I am judging things right, multistrap unpacks all the selected
packages into their target location, before it then goes and runs all
the available preinst scripts.

So multistrap is not really following the "pre" here.

Many preinst scripts are written based on the Debian policy, intended
to be run before unpack. For example, use multistrap's stretch.conf
but add "addimportant=true". The end result will have
/etc/vim/vimrc.tiny.dpkg-bak instead of /etc/vim/vimrc.tiny.

This situation happens due to vim-common's preinst script trying to
clean up an old version of this file (it now got moved to vim-tiny).
For a new install the preinst script would normally do almost nothing
here, because it would bail out after seeing that /etc/vim/vimrc.tiny
doesn't exist at all (the package has not yet been unpacked).
But in this case, since multistrap has unpacked it first, the behaviour
is different (and not as the Debian policy intended).

I believe multistrap's preinst/unpack behaviour needs to be revisited
based on Debian policy and behaviour of apt/dpkg.

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.13.0-17-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C 
(charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages multistrap depends on:
ii  apt                            1.4.8
ii  libconfig-auto-perl            0.44-1
ii  liblocale-gettext-perl         1.07-3+b1
ii  libparse-debian-packages-perl  0.03-2
ii  perl                           5.24.1-3+deb9u2

multistrap recommends no packages.

Versions of packages multistrap suggests:
pn  fakeroot  <none>

-- no debconf information

Reply via email to