[PATCH v2 0/2] Running maintscripts for a different architecture

2014-09-29 Thread Andreas Oberritter
Dear dpkg developers, this is v2 of the patch set I sent last month, which includes a fix to let update-alternatives succeed in offline-mode on distributions not based on Debian, e.g. ArchLinux. altdb_get_namelist() ignored the root directory, so it mistakenly used the host's altdb. I dropped the

[PATCH v2 2/2] update-alternatives: Implement offline mode

2014-09-29 Thread Andreas Oberritter
Lets update-alternatives manage symlinks inside a cross-arch root filesystem in a directory specified by DPKG_INSTDIR. Signed-off-by: Andreas Oberritter --- Changes since v1: altdb_get_namelist() didn't respect DPKG_INSTDIR. utils/update-alternatives.c | 171 ---

[PATCH v2 1/2] dpkg: Add option --cross-bootstrap

2014-09-29 Thread Andreas Oberritter
If --cross-bootstrap is set, don't chroot into the target root directory, but just export DPKG_INSTDIR for the execution of maintscripts. This is useful for Yocto/OpenEmbedded, where programs like update-alternatives, update-rc.d or systemctl run natively or emulated on the build system when creat