[package] opkg: the current version leaves empty temp directories behind, clean them...
[openwrt.git] / package / opkg / patches / 003-fs_overlay_support.patch
1 This patch adds a new configuration option (overlay_root) specifying
2 what mount point opkg should check for available storage space.
3
4 Signed-off-by: Nicolas Thill <nico@openwrt.org>
5
6
7 --- a/libopkg/opkg_conf.c
8 +++ b/libopkg/opkg_conf.c
9 @@ -58,6 +58,7 @@
10 { "noaction", OPKG_OPT_TYPE_BOOL, &_conf.noaction },
11 { "nodeps", OPKG_OPT_TYPE_BOOL, &_conf.nodeps },
12 { "offline_root", OPKG_OPT_TYPE_STRING, &_conf.offline_root },
13 + { "overlay_root", OPKG_OPT_TYPE_STRING, &_conf.overlay_root },
14 { "proxy_passwd", OPKG_OPT_TYPE_STRING, &_conf.proxy_passwd },
15 { "proxy_user", OPKG_OPT_TYPE_STRING, &_conf.proxy_user },
16 { "query-all", OPKG_OPT_TYPE_BOOL, &_conf.query_all },
17 --- a/libopkg/opkg_conf.h
18 +++ b/libopkg/opkg_conf.h
19 @@ -74,6 +74,7 @@
20 int check_signature;
21 int nodeps; /* do not follow dependences */
22 char *offline_root;
23 + char *overlay_root;
24 int query_all;
25 int verbosity;
26 int noaction;
27 --- a/libopkg/opkg_install.c
28 +++ b/libopkg/opkg_install.c
29 @@ -194,8 +194,11 @@
30 if (conf->force_space || pkg->installed_size == 0)
31 return 0;
32
33 - root_dir = pkg->dest ? pkg->dest->root_dir :
34 - conf->default_dest->root_dir;
35 + root_dir = pkg->dest
36 + ? pkg->dest->root_dir
37 + : conf->overlay_root
38 + ? conf->overlay_root
39 + : conf->default_dest->root_dir;
40 kbs_available = get_available_kbytes(root_dir);
41
42 pkg_size_kbs = (pkg->installed_size + 1023)/1024;
This page took 0.043705 seconds and 5 git commands to generate.