diff options
author | ticktock35 <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) |
commit | e2fd21015aeedba1a9936f46b185c41047ee034d (patch) | |
tree | 903fe165a1d25f6b1b698cf2c501bc266b0b37ab /opkg_download.c | |
parent | c82094c9e17afef41e49cff3eabdbdd0f6ca3a21 (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_download.c')
-rw-r--r-- | opkg_download.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/opkg_download.c b/opkg_download.c index c3fa44c..2bdbb00 100644 --- a/opkg_download.c +++ b/opkg_download.c @@ -201,6 +201,7 @@ int opkg_download_pkg(opkg_conf_t *conf, pkg_t *pkg, const char *dir) { int err; char *url; + char *pkgid; if (pkg->src == NULL) { opkg_message(conf,OPKG_ERROR, "ERROR: Package %s (parent %s) is not available from any configured src.\n", @@ -208,6 +209,10 @@ int opkg_download_pkg(opkg_conf_t *conf, pkg_t *pkg, const char *dir) return -1; } + sprintf_alloc (&pkgid, "%s;%s;%s;", pkg->name, pkg->version, pkg->architecture); + opkg_set_current_state (OPKG_STATE_DOWNLOADING_PKG, pkgid); + free (pkgid); + sprintf_alloc(&url, "%s/%s", pkg->src->value, pkg->filename); /* XXX: BUG: The pkg->filename might be something like @@ -219,6 +224,7 @@ int opkg_download_pkg(opkg_conf_t *conf, pkg_t *pkg, const char *dir) err = opkg_download(conf, url, pkg->local_filename); free(url); + opkg_set_current_state (OPKG_STATE_NONE, NULL); return err; } |