[Buildroot] [PATCH 11/40] package/hans: preserve /usr/sbin symlink
James Hilliard
james.hilliard1 at gmail.com
Wed May 6 22:33:12 UTC 2026
With BR2_ROOTFS_MERGED_BIN=y, /usr/sbin is a symlink to bin.
Using install -D for files below $(TARGET_DIR)/usr/sbin can create
the parent directory path and replace that symlink with a real
directory.
With per-package directories, this can later make rsync fail when a
package target directory contains a non-empty usr/sbin directory and
the skeleton provides usr/sbin -> bin.
The skeleton dependency has already created /usr/sbin, either as a
directory or as the merged-bin symlink, so use plain install and let it
follow the existing path.
Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
---
package/hans/hans.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/hans/hans.mk b/package/hans/hans.mk
index 6d2b1dabe5..07ae336329 100644
--- a/package/hans/hans.mk
+++ b/package/hans/hans.mk
@@ -14,7 +14,7 @@ define HANS_BUILD_CMDS
endef
define HANS_INSTALL_TARGET_CMDS
- $(INSTALL) -m 755 -D $(@D)/hans $(TARGET_DIR)/usr/sbin/hans
+ $(INSTALL) -m 755 $(@D)/hans $(TARGET_DIR)/usr/sbin/hans
endef
$(eval $(generic-package))
--
2.53.0
More information about the buildroot
mailing list