Package: dpkg
Version: 1.19.0
Severity: wishlist
File: /usr/bin/update-alternatives
User: debian-d...@lists.debian.org
Usertags: dpkg-root-support

The update-alternatives program, when run from a maintainer script with
DPKG_ROOT set, should respect that variable in order to facilitate
bootstrap installations[1].

There is a patch available at [2]/[3] in which OpenEmbedded implement
this (they call it "offline mode"); that patch doesn't apply anymore
though since the latest update-alternative changes, and AFAICT would
only work if the installation directory was the current working
directory (which AFAIK is not guaranteed by dpkg).

Given that update-alternatives already respects DPKG_ADMINDIR, it should
be sufficient to adapt altdir to prepend DPKG_ROOT; I'm just trying a
small patch to that.


Note that this is distinct from #77828 which was about using u-a for user
homes, while this just happens to mean that a user can also use u-a but
in an out-of-root Debian installation.

[1]: https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap?action=subscribe
[2]: https://lists.debian.org/debian-dpkg/2016/12/msg00004.html
[3]: https://patchwork.openembedded.org/patch/134905/

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-8.1
ii  libc6        2.24-14
ii  liblzma5     5.2.2-1.3
ii  libselinux1  2.6-3+b2
ii  tar          1.29b-2
ii  zlib1g       1:1.2.8.dfsg-5

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt            1.5~beta1
pn  debsig-verify  <none>

-- no debconf information

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom

Attachment: signature.asc
Description: PGP signature

Reply via email to