base-files: skip fix-group-user uci-default for APK installation
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 26 May 2024 17:30:32 +0000 (19:30 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 11 Jun 2024 21:58:18 +0000 (23:58 +0200)
For APK installation we don't have /usr/lib/opkg/info and user fixup are
handled dirrectly. Skip the script in such case.

Also remove this uci-defaults if we have CONFIG_USE_APK enabled.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
package/base-files/Makefile
package/base-files/files/etc/uci-defaults/13_fix-group-user

index 4425bb346deaba30fcd15baea1e89cad8b43bda1..313bf377b492fead68716f24564e361ae9bd82c4 100644 (file)
@@ -249,6 +249,8 @@ ifneq ($(CONFIG_USE_APK),)
        mkdir -p $(1)/etc/apk/
        $(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories)
        $(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories
+
+       rm -f $(1)/etc/uci-defaults/13_fix-group-user
 else
        $(if $(CONFIG_CLEAN_IPKG),, \
                mkdir -p $(1)/etc/opkg; \
index 74f501e8f77fcbe2c4a3a0143a1182d91971b0eb..c5cc74e1a038bd9b13279c88bc787b0075959bed 100644 (file)
@@ -1,5 +1,8 @@
 . /lib/functions.sh
 
+# Skip if we don't have /usr/lib/opkg/info (APK installation)
+[ -d /usr/lib/opkg/info ] || exit 0
+
 for file in $(grep -sl Require-User /usr/lib/opkg/info/*.control); do
        file="${file##*/}"
        file="${file%.control}"