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
This commit is contained in:
parent
66eee451b9
commit
e528ed80da
2 changed files with 16 additions and 7 deletions
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
PKG_NAME:=opkg
|
PKG_NAME:=opkg
|
||||||
PKG_REV:=503
|
PKG_REV:=503
|
||||||
PKG_VERSION:=$(PKG_REV)
|
PKG_VERSION:=$(PKG_REV)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=svn
|
PKG_SOURCE_PROTO:=svn
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||||
|
|
|
@ -26,17 +26,26 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
|
||||||
int noaction;
|
int noaction;
|
||||||
--- a/libopkg/opkg_install.c
|
--- a/libopkg/opkg_install.c
|
||||||
+++ b/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)
|
if (conf->force_space || pkg->installed_size == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
- root_dir = pkg->dest ? pkg->dest->root_dir :
|
- root_dir = pkg->dest ? pkg->dest->root_dir :
|
||||||
- conf->default_dest->root_dir;
|
- conf->default_dest->root_dir;
|
||||||
+ root_dir = pkg->dest
|
+ if( !pkg->dest || !strcmp(pkg->dest->name, "root") )
|
||||||
+ ? pkg->dest->root_dir
|
+ root_dir = conf->overlay_root;
|
||||||
+ : conf->overlay_root
|
+ else
|
||||||
+ ? conf->overlay_root
|
+ root_dir = pkg->dest->root_dir;
|
||||||
+ : conf->default_dest->root_dir;
|
+
|
||||||
|
+ if( !root_dir )
|
||||||
|
+ root_dir = conf->default_dest->root_dir;
|
||||||
|
+
|
||||||
kbs_available = get_available_kbytes(root_dir);
|
kbs_available = get_available_kbytes(root_dir);
|
||||||
|
|
||||||
pkg_size_kbs = (pkg->installed_size + 1023)/1024;
|
pkg_size_kbs = (pkg->installed_size + 1023)/1024;
|
||||||
|
|
Loading…
Reference in a new issue