diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-22 11:46:49 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-22 11:46:49 +0000 |
commit | e528ed80da2a55026cc8ad814468549e4aacca86 (patch) | |
tree | 478d5c71297c217bb625129e1d6da6e825e2d3f1 /package/opkg/patches | |
parent | 66eee451b94242b8ec72e0c7a3e3b49a06643bc2 (diff) | |
download | mtk-20170518-e528ed80da2a55026cc8ad814468549e4aacca86.zip mtk-20170518-e528ed80da2a55026cc8ad814468549e4aacca86.tar.gz mtk-20170518-e528ed80da2a55026cc8ad814468549e4aacca86.tar.bz2 |
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
SVN-Revision: 18884
Diffstat (limited to 'package/opkg/patches')
-rw-r--r-- | package/opkg/patches/003-fs_overlay_support.patch | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/package/opkg/patches/003-fs_overlay_support.patch b/package/opkg/patches/003-fs_overlay_support.patch index 8d18c28..aa8b83b 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; |