pkg_run_script: use pkg->dest in half installed case
[oweals/opkg-lede.git] / libopkg / pkg.c
index c0de884bfe8916cd9048e1d035a359b560732c21..551c62917225524204d6515148b3de7ed8757c21 100644 (file)
@@ -1335,7 +1335,8 @@ int pkg_run_script(pkg_t * pkg, const char *script, const char *args)
        /* 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);