summaryrefslogtreecommitdiffstats
path: root/opkg_install.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-14 23:21:21 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-14 23:21:21 (EST)
commite2fd21015aeedba1a9936f46b185c41047ee034d (patch)
tree903fe165a1d25f6b1b698cf2c501bc266b0b37ab /opkg_install.c
parentc82094c9e17afef41e49cff3eabdbdd0f6ca3a21 (diff)
opkg: add downloading, configuring and installing state changes
git-svn-id: http://opkg.googlecode.com/svn/trunk@27 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'opkg_install.c')
-rw-r--r--opkg_install.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/opkg_install.c b/opkg_install.c
index b278724..599ae4d 100644
--- a/opkg_install.c
+++ b/opkg_install.c
@@ -34,6 +34,7 @@ typedef void (*sighandler_t)(int);
#include "opkg_utils.h"
#include "opkg_message.h"
+#include "opkg_state.h"
#include "sprintf_alloc.h"
#include "file_util.h"
@@ -751,6 +752,7 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int from_upgrade)
abstract_pkg_t *ab_pkg = NULL;
int old_state_flag;
char* file_md5;
+ char *pkgid;
if ( from_upgrade )
@@ -851,6 +853,10 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int 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;
@@ -991,6 +997,7 @@ int opkg_install_pkg(opkg_conf_t *conf, pkg_t *pkg, int from_upgrade)
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)