diff options
author | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-12-15 13:11:12 +0000 |
---|---|---|
committer | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-12-15 13:11:12 +0000 |
commit | 6016a11077df92bae00a15bcbd7cc3ad8912d90e (patch) | |
tree | 0b57cec1a0cee78de0f69c58fa80a866c0b57f75 /package | |
parent | 346f19f3f1ad840030862be314f6adfcee5f99c4 (diff) |
add a patch helping available storage space detection, remove workaround from [13611], bump release number
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13650 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/opkg/Makefile | 2 | ||||
-rw-r--r-- | package/opkg/files/opkg.conf | 4 | ||||
-rw-r--r-- | package/opkg/patches/003-fs_overlay_support.patch | 49 |
3 files changed, 51 insertions, 4 deletions
diff --git a/package/opkg/Makefile b/package/opkg/Makefile index 26ae4d2ea1..d262a70e72 100644 --- a/package/opkg/Makefile +++ b/package/opkg/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=opkg PKG_REV:=4564 PKG_VERSION:=$(PKG_REV) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) diff --git a/package/opkg/files/opkg.conf b/package/opkg/files/opkg.conf index 2ecf2a5c58..a0d3334431 100644 --- a/package/opkg/files/opkg.conf +++ b/package/opkg/files/opkg.conf @@ -2,6 +2,4 @@ src/gz snapshots http://downloads.openwrt.org/snapshots/$S/packages dest root / dest ram /tmp lists_dir ext /var/opkg-lists -# XXX: disable checking for available storage space until we -# figure how to do it properly on all fs layouts -option force_space +option overlay_root /jffs diff --git a/package/opkg/patches/003-fs_overlay_support.patch b/package/opkg/patches/003-fs_overlay_support.patch new file mode 100644 index 0000000000..63a34cf9d3 --- /dev/null +++ b/package/opkg/patches/003-fs_overlay_support.patch @@ -0,0 +1,49 @@ +This patch adds a new configuration option (overlay_root) specifying +what mount point opkg should check for available storage space. + +Signed-off-by: Nicolas Thill <nico@openwrt.org> + + +diff -ruN opkg-4564-old/libopkg/opkg_conf.c opkg-4564-new/libopkg/opkg_conf.c +--- opkg-4564-old/libopkg/opkg_conf.c 2008-08-04 19:18:51.000000000 +0200 ++++ opkg-4564-new/libopkg/opkg_conf.c 2008-12-12 02:26:35.000000000 +0100 +@@ -64,6 +64,7 @@ + { "offline_root", OPKG_OPT_TYPE_STRING, &conf->offline_root }, + { "offline_root_post_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_post_script_cmd }, + { "offline_root_pre_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_pre_script_cmd }, ++ { "overlay_root", OPKG_OPT_TYPE_STRING, &conf->overlay_root }, + { "proxy_passwd", OPKG_OPT_TYPE_STRING, &conf->proxy_passwd }, + { "proxy_user", OPKG_OPT_TYPE_STRING, &conf->proxy_user }, + { "query-all", OPKG_OPT_TYPE_BOOL, &conf->query_all }, +diff -ruN opkg-4564-old/libopkg/opkg_conf.h opkg-4564-new/libopkg/opkg_conf.h +--- opkg-4564-old/libopkg/opkg_conf.h 2008-08-04 19:18:51.000000000 +0200 ++++ opkg-4564-new/libopkg/opkg_conf.h 2008-12-12 02:25:33.000000000 +0100 +@@ -67,6 +67,7 @@ + char *offline_root; + char *offline_root_pre_script_cmd; + char *offline_root_post_script_cmd; ++ char *overlay_root; + int query_all; + int verbosity; + int noaction; +Binary files opkg-4564-old/libopkg/opkg_conf.o and opkg-4564-new/libopkg/opkg_conf.o differ +diff -ruN opkg-4564-old/libopkg/opkg_install.c opkg-4564-new/libopkg/opkg_install.c +--- opkg-4564-old/libopkg/opkg_install.c 2008-08-04 19:18:51.000000000 +0200 ++++ opkg-4564-new/libopkg/opkg_install.c 2008-12-12 02:29:13.000000000 +0100 +@@ -525,9 +525,15 @@ + * 3) return a proper error code instead of 1 + */ + int comp_size, blocks_available; ++ char *root; + + if (!conf->force_space && pkg->installed_size != NULL) { +- blocks_available = get_available_blocks(conf->default_dest->root_dir); ++ if (conf->overlay_root != NULL) { ++ root = conf->overlay_root; ++ } else { ++ root = conf->default_dest->root_dir; ++ } ++ blocks_available = get_available_blocks(root); + + comp_size = strtoul(pkg->installed_size, NULL, 0); + /* round up a blocks count without doing fancy-but-slow casting jazz */ |