diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-04-11 22:08:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-04-11 22:08:43 +0000 |
commit | 37f7e8afdcb46cbdf238ea3d0186c8a2573d3a77 (patch) | |
tree | 4ceb32bf29f453ed768001fe2f6b645673c2aace /package/opkg/patches/003-fs_overlay_support.patch | |
parent | e28b459b215a7432278d7e43aaed291553361885 (diff) | |
download | mtk-20170518-37f7e8afdcb46cbdf238ea3d0186c8a2573d3a77.zip mtk-20170518-37f7e8afdcb46cbdf238ea3d0186c8a2573d3a77.tar.gz mtk-20170518-37f7e8afdcb46cbdf238ea3d0186c8a2573d3a77.tar.bz2 |
opkg: update to r618
SVN-Revision: 26598
Diffstat (limited to 'package/opkg/patches/003-fs_overlay_support.patch')
-rw-r--r-- | package/opkg/patches/003-fs_overlay_support.patch | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/package/opkg/patches/003-fs_overlay_support.patch b/package/opkg/patches/003-fs_overlay_support.patch deleted file mode 100644 index 63933bd..0000000 --- a/package/opkg/patches/003-fs_overlay_support.patch +++ /dev/null @@ -1,64 +0,0 @@ -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> - - ---- a/libopkg/opkg_conf.c -+++ b/libopkg/opkg_conf.c -@@ -63,6 +63,7 @@ opkg_option_t options[] = { - { "download_only", OPKG_OPT_TYPE_BOOL, &_conf.download_only }, - { "nodeps", OPKG_OPT_TYPE_BOOL, &_conf.nodeps }, - { "offline_root", OPKG_OPT_TYPE_STRING, &_conf.offline_root }, -+ { "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 }, ---- a/libopkg/opkg_conf.h -+++ b/libopkg/opkg_conf.h -@@ -78,6 +78,7 @@ struct opkg_conf - int check_signature; - int nodeps; /* do not follow dependencies */ - char *offline_root; -+ char *overlay_root; - int query_all; - int verbosity; - int noaction; ---- a/libopkg/opkg_install.c -+++ b/libopkg/opkg_install.c -@@ -21,6 +21,7 @@ - #include <time.h> - #include <signal.h> - #include <unistd.h> -+#include <sys/stat.h> - - #include "pkg.h" - #include "pkg_hash.h" -@@ -192,13 +193,24 @@ static int - verify_pkg_installable(pkg_t *pkg) - { - unsigned long kbs_available, pkg_size_kbs; -- char *root_dir; -+ char *root_dir = NULL; -+ struct stat s; - - if (conf->force_space || pkg->installed_size == 0) - return 0; - -- root_dir = pkg->dest ? pkg->dest->root_dir : -- conf->default_dest->root_dir; -+ if( pkg->dest ) -+ { -+ if( !strcmp(pkg->dest->name, "root") && conf->overlay_root -+ && !stat(conf->overlay_root, &s) && (s.st_mode & S_IFDIR) ) -+ 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; |