#include "opkg_utils.h"
#include "opkg_message.h"
+#include "opkg_state.h"
#include "sprintf_alloc.h"
#include "file_util.h"
&& (dep->state_status != SS_UNPACKED)) {
opkg_message(conf, OPKG_DEBUG2,"Function: %s calling opkg_install_pkg \n",__FUNCTION__);
err = opkg_install_pkg(conf, dep,0);
+ /* mark this package as having been automatically installed to
+ * satisfy a dependancy */
+ dep->auto_installed = 1;
if (err) {
pkg_vec_free(depends);
return err;
abstract_pkg_t *ab_pkg = NULL;
int old_state_flag;
char* file_md5;
+ char *pkgid;
if ( from_upgrade )
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 (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;
return err;
}
+ opkg_set_current_state (OPKG_STATE_NONE, NULL);
}
static int prerm_upgrade_old_pkg(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg)