summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-04-03 04:22:03 (EDT)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-04-03 04:22:03 (EDT)
commit17afa481c6b0bee87de3896a498c4c6a4de8f838 (patch)
tree189ec6a0b3d7e9d02d0c6992bcc5208dfa38746a /libopkg
parent33c7e93565efbb0c07d9aa0f8b72ca737111f338 (diff)
using pkg->dest->root_dir
git-svn-id: http://opkg.googlecode.com/svn/trunk@211 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg_install.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
index 15a5ecc..719090b 100644
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
@@ -475,9 +475,11 @@ static int verify_pkg_installable(opkg_conf_t *conf, pkg_t *pkg)
* 3) return a proper error code instead of 1
*/
int comp_size, blocks_available;
+ char *root_dir;
if (!conf->force_space && pkg->installed_size != NULL) {
- blocks_available = get_available_blocks(conf->default_dest->root_dir);
+ root_dir = pkg->dest ? pkg->dest->root_dir : conf->default_dest->root_dir;
+ blocks_available = get_available_blocks(root_dir);
comp_size = strtoul(pkg->installed_size, NULL, 0);
/* round up a blocks count without doing fancy-but-slow casting jazz */
@@ -486,7 +488,7 @@ static int verify_pkg_installable(opkg_conf_t *conf, pkg_t *pkg)
if (comp_size >= blocks_available) {
opkg_message(conf, OPKG_ERROR,
"Only have %d available blocks on filesystem %s, pkg %s needs %d\n",
- blocks_available, conf->default_dest->root_dir, pkg->name, comp_size);
+ blocks_available, root_dir, pkg->name, comp_size);
return ENOSPC;
}
}