summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-05 12:18:12 (EST)
committer pixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-05 12:18:12 (EST)
commit4ceba65b87ce3d8961d9bacf369fc1f618e31f1d (patch)
tree98999d826e850d2c38c10e751bf6d0bcf666ed2a
parentf0463978ddbcfd963819022c2da8e04ff310720c (diff)
--download-only download using original names
--download-only will download the packages using original names when --cache isn't supplied (in the current working directory) git-svn-id: http://opkg.googlecode.com/svn/trunk@513 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r--libopkg/opkg_install.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
index 5472ca2..e014d72 100644
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
@@ -1256,7 +1256,15 @@ opkg_install_pkg(pkg_t *pkg, int from_upgrade)
return -1;
if (pkg->local_filename == NULL) {
- err = opkg_download_pkg(pkg, conf->tmp_dir);
+ if(!conf->cache && conf->download_only){
+ char cwd[4096];
+ if(getcwd(cwd, sizeof(cwd)) != NULL)
+ err = opkg_download_pkg(pkg, cwd);
+ else
+ return -1;
+ } else {
+ err = opkg_download_pkg(pkg, conf->tmp_dir);
+ }
if (err) {
opkg_msg(ERROR, "Failed to download %s. "
"Perhaps you need to run 'opkg update'?\n",