Fixes running scripts for packages in half-installed state which would
otherwise fail with:
* pkg_run_script: Internal error: ... has a NULL tmp_unpack_dir.
* opkg_remove_pkg: not removing package "...", prerm script failed
Upstream bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=11245
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
[Jo-Philipp Wich: rebased onto opkg-lede, updated commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
/* Installed packages have scripts in pkg->dest->info_dir, uninstalled packages
have scripts in tmp_unpack_dir. */
if (pkg->state_status == SS_INSTALLED
- || pkg->state_status == SS_UNPACKED) {
+ || pkg->state_status == SS_UNPACKED
+ || pkg->state_status == SS_HALF_INSTALLED) {
if (pkg->dest == NULL) {
opkg_msg(ERROR, "Internal error: %s has a NULL dest.\n",
pkg->name);