#include "opkg_utils.h"
#include "opkg_message.h"
-#include "opkg_state.h"
+#include "opkg_cmd.h"
#include "opkg_defines.h"
#include "sprintf_alloc.h"
pkg = hash_insert_pkg(&conf->pkg_hash, pkg, 1,conf);
old = pkg_hash_fetch_installed_by_name(&conf->pkg_hash, pkg->name);
- pkg->local_filename = strdup(filename);
-
if (old) {
old_version = pkg_version_str_alloc(old);
new_version = pkg_version_str_alloc(pkg);
#ifdef HAVE_SHA256
char* file_sha256;
#endif
- char *pkgid;
-
+
if ( from_upgrade )
message = 1; /* Coming from an upgrade, and should change the output message */
replacees = pkg_vec_alloc();
pkg_get_installed_replacees(conf, pkg, replacees);
- sprintf_alloc (&pkgid, "%s;%s;%s;", pkg->name, pkg->version, pkg->architecture);
- opkg_set_current_state (conf, OPKG_STATE_INSTALLING_PKG, pkgid);
- free (pkgid);
-
/* this next section we do with SIGINT blocked to prevent inconsistency between opkg database and filesystem */
{
sigset_t newset, oldset;
pkg_vec_free (replacees);
return OPKG_ERR_UNKNOWN;
}
- opkg_set_current_state (conf, OPKG_STATE_NONE, NULL);
}
static int prerm_upgrade_old_pkg(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg)