[Buildroot] [PATCH 14/40] package/libpri: preserve /usr/sbin symlink

James Hilliard james.hilliard1 at gmail.com
Wed May 6 22:33:15 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/libpri/libpri.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libpri/libpri.mk b/package/libpri/libpri.mk
index 48a1019210..4b359008ba 100644
--- a/package/libpri/libpri.mk
+++ b/package/libpri/libpri.mk
@@ -46,7 +46,7 @@ endef
 
 define LIBPRI_INSTALL_TARGET_CMDS
 	$(foreach u,$(LIBPRI_UTILS),\
-		$(INSTALL) -D -m 0755 $(@D)/$(u) $(TARGET_DIR)/usr/sbin/$(u)$(sep))
+		$(INSTALL) -m 0755 $(@D)/$(u) $(TARGET_DIR)/usr/sbin/$(u)$(sep))
 	$(call LIBPRI_INSTALL_SO,$(TARGET_DIR))
 endef
 
-- 
2.53.0



More information about the buildroot mailing list