summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJustin Klaassen <justin@tidylabs.app>2024-01-18 15:36:22 +0000
committerRobert Marko <robimarko@gmail.com>2024-02-16 10:01:19 +0100
commitbe9023ed4311c89fedad17c9d8b821828565903e (patch)
tree167dfa19e03e7b64e1e496d69c5dd40de9974ba9 /include
parentd5e2177a6b67a980f240302fc7d9ba59307af464 (diff)
downloadopenwrt-be9023ed4311c89fedad17c9d8b821828565903e.tar.gz
openwrt-be9023ed4311c89fedad17c9d8b821828565903e.tar.bz2
openwrt-be9023ed4311c89fedad17c9d8b821828565903e.zip
build: fix opkg flags in rootfs
By default opkg sets the "user" flag when a package is installed, which resulted in most packages in the rootfs having this flag set incorrectly. This patch removes the "user" flag from all installed packages when preparing the rootfs image. Fixes: #14427 Signed-off-by: Justin Klaassen <justin@tidylabs.app>
Diffstat (limited to 'include')
-rw-r--r--include/rootfs.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rootfs.mk b/include/rootfs.mk
index f2ed648d2f..2128aefc2a 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -87,6 +87,11 @@ define prepare_rootfs
fi; \
done || true \
)
+ awk -i inplace \
+ '/^Status:/ { \
+ if ($$3 == "user") { $$3 = "ok" } \
+ else { sub(/,\<user\>|\<user\>,/, "", $$3) } \
+ }1' $(1)/usr/lib/opkg/status
$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status)
@-find $(1) -name CVS -o -name .svn -o -name .git -o -name '.#*' | $(XARGS) rm -rf
rm -rf \