Robert Marko 5b6f8353fe include/package-pack: actually call default_postinist/prerm when using APK
Currently, when you install a package that ships uci-defaults scripts they
are not getting executed during package installation.

For example, if you install a new LuCI theme it ships a uci-defaults script
to add it to the UCI LuCI config so the theme is actually selectable but
that does not happen until the device is rebooted so that uci-defaults
script is actually executed.

It turns out that the recipe for post-install is the issue since it will
include contents of postinst-pkg before the call to default_postinist.
This is an issue since postinst-pkg will exit with code 0 before we ever
reach the call to default_postinist.

So, lets simply make the call to default_postinist before postinst-pkg
inclusion which is what OPKG based installation does.

The same issue affects pre-deinstall script but its not actually being hit
since we dont seem to be actually even generating prerm-pkg scripts but
lets fix this theoretical issue as well.

Fixes: #16987
Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/17023
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-21 17:20:43 +01:00
..
2024-09-09 10:36:47 +02:00
2024-11-12 02:31:06 +00:00
2021-02-05 14:54:47 +01:00
2024-11-16 00:25:14 +01:00
2024-05-04 14:14:16 +08:00
2024-11-12 02:31:06 +00:00
2024-10-22 00:52:03 +02:00
2022-11-27 00:52:06 +01:00
2023-04-05 08:24:49 -03:00
2021-10-24 18:20:50 +02:00