Skip to content

Commit

Permalink
build: fix opkg flags in rootfs
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jck112 authored and robimarko committed Feb 16, 2024
1 parent d5e2177 commit be9023e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/rootfs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit be9023e

Please sign in to comment.