aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-12-22 11:46:49 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-12-22 11:46:49 +0000
commite1aabea527c5b45d2a3998e55f43acda0b36aa78 (patch)
tree7e320259dcdf9a0a3415ab9830b4b907a4c08a07
parentb2cbc0fc5934971dc21c9c20d2ff03555a71b55b (diff)
downloadmaster-187ad058-e1aabea527c5b45d2a3998e55f43acda0b36aa78.tar.gz
master-187ad058-e1aabea527c5b45d2a3998e55f43acda0b36aa78.tar.bz2
master-187ad058-e1aabea527c5b45d2a3998e55f43acda0b36aa78.zip
[package] opkg: only select overlay_root if the install destination is root, this eliminates the need for force_space when using external destinations like usb disks
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18884 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/opkg/Makefile2
-rw-r--r--package/opkg/patches/003-fs_overlay_support.patch21
2 files changed, 16 insertions, 7 deletions
diff --git a/package/opkg/Makefile b/package/opkg/Makefile
index 6cabdec305..491d52e432 100644
--- a/package/opkg/Makefile
+++ b/package/opkg/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=opkg
PKG_REV:=503
PKG_VERSION:=$(PKG_REV)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_VERSION:=$(PKG_REV)
diff --git a/package/opkg/patches/003-fs_overlay_support.patch b/package/opkg/patches/003-fs_overlay_support.patch
index 8d18c28d2c..aa8b83ba6e 100644
--- a/package/opkg/patches/003-fs_overlay_support.patch
+++ b/package/opkg/patches/003-fs_overlay_support.patch
@@ -26,17 +26,26 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
int noaction;
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
-@@ -194,8 +194,11 @@
+@@ -189,13 +189,19 @@
+ verify_pkg_installable(pkg_t *pkg)
+ {
+ unsigned long kbs_available, pkg_size_kbs;
+- char *root_dir;
++ char *root_dir = NULL;
+
if (conf->force_space || pkg->installed_size == 0)
return 0;
- root_dir = pkg->dest ? pkg->dest->root_dir :
- conf->default_dest->root_dir;
-+ root_dir = pkg->dest
-+ ? pkg->dest->root_dir
-+ : conf->overlay_root
-+ ? conf->overlay_root
-+ : conf->default_dest->root_dir;
++ if( !pkg->dest || !strcmp(pkg->dest->name, "root") )
++ root_dir = conf->overlay_root;
++ else
++ root_dir = pkg->dest->root_dir;
++
++ if( !root_dir )
++ root_dir = conf->default_dest->root_dir;
++
kbs_available = get_available_kbytes(root_dir);
pkg_size_kbs = (pkg->installed_size + 1023)/1024;