summaryrefslogtreecommitdiffstats
path: root/opkg_download.c
diff options
context:
space:
mode:
Diffstat (limited to 'opkg_download.c')
-rw-r--r--opkg_download.c6
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;
}