-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
include/package-pack: actually call default_postinist/prerm with APK #17023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
postrm seems also not work |
|
@vernesong Why do you think so? |
I installed a build here : https://downloads.immortalwrt.org/snapshots/targets/x86/64/ After I use the apk del command there is no file named 1 find in /tmp |
|
No idea, but |
|
Hm, now I am wondering how it works for |
|
Ok, so APK properly supports post install, post deinstall etc states, but make is driving me nuts as I cannot figure out how to make it add the appropriate --script argument to APK only if the file actually exists, it either doesn't add the argument or always evaluates true |
077a724 to
54d2ce0
Compare
|
|
|
Awesome thanks for taking care! |
|
I just tested by adding postinst and postrm to an existing package, rebuilding all and examining the contents of the apk. All looked correct to me with the script contents in the right places. |
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
54d2ce0 to
fc2ba10
Compare
|
Thanks! Rebased on top of main and merged! |
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
…g 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: openwrt#16987 Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, postrm scripts are not being executed when package is removed with APK since they are not being included at all. So, lets use APK-s support for post-deinstall scripts and ship our postrm scripts if packages define them. Fixes: d788ab3 ("build: add APK package build capabilities") Link: openwrt#17023 Signed-off-by: Robert Marko <robimarko@gmail.com>
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: d788ab3 ("build: add APK package build capabilities")