Revert "package/skeleton: drop $(HOST_DIR)/usr compatibility symlink"

In 38b798da73 (package/skeleton: drop $(HOST_DIR)/usr compatibility
symlink), we considered that $(HOST_DIR)/usr is a legacy symlink, and so
we dropped it. During review, it was pointed out that:

 1. [if] something installs in HOST_DIR/usr it's probably going to
    break somewhere down the line,

 2. DESTDIR is empty for host builds. And PREFIX/usr would be completely
    crazy.

However, we do have a package where DESTDIR is not empty for host
packages. Indeed, for host-systemd, we do have a convoluted sequence
where we configure it for the traditional /usr prefix, rather than
$(HOST_DIR) for all other host packages, and we install it with
DESTDIR=$(HOST_DIR). This is because systemd has to interpret path on
the target, not on the host, and confusion ensues if host systemd is not
configured with the same prefix as the target systemd. See commit
35c11a027c (package/systemd: add host variant) for the full, in-depth
explanations.

This reverts commit 38b798da73.

This also changes the comment to note that, although legacy, the usr
symlink is still required for some weird host packages.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2023.05.x
Yann E. MORIN 2023-04-11 21:19:30 +02:00
parent 65849bd96d
commit 576d709a69
1 changed files with 5 additions and 0 deletions

View File

@ -11,7 +11,12 @@
SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
SKELETON_ADD_SKELETON_DEPENDENCY = NO
# Although the $(HOST_DIR)/usr symlink is mostly for backward compatibility,
# there are weird packages that still require it (see host-systemd, and
# commit 35c11a027c88).
define HOST_SKELETON_INSTALL_CMDS
# check-package DoNotInstallToHostdirUsr
$(Q)ln -snf . $(HOST_DIR)/usr
$(Q)mkdir -p $(HOST_DIR)/lib
$(Q)mkdir -p $(HOST_DIR)/include
$(Q)case $(HOSTARCH) in \