diff options
author | Amy Fong <amy.fong@windriver.com> | 2012-07-17 10:30:34 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-19 17:18:11 +0100 |
commit | 23df8e0a061a3e0412a965c759b6970d8c0a9241 (patch) | |
tree | 3c9a8a42751f1e691945ec03457a667e9cf252e2 /meta | |
parent | d1c9fab93b9beeaffa428c40251349712e10649d (diff) | |
download | poky-23df8e0a061a3e0412a965c759b6970d8c0a9241.tar.gz |
busybox: busybox wget -P option ignored
busybox wget testing fails
In cases where busybox wget is invoked with -P <...> and the url ends
in "/", the download directory is ignored (ie the file index.html is
implied), this change enables the -P option for those urls.
(From OE-Core rev: 95fd02de0aee0a1907b51f9ccda260d483e6e292)
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/busybox/busybox-1.19.4/wget_dl_dir_fix.patch | 30 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox_1.19.4.bb | 3 |
2 files changed, 32 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/busybox-1.19.4/wget_dl_dir_fix.patch b/meta/recipes-core/busybox/busybox-1.19.4/wget_dl_dir_fix.patch new file mode 100644 index 0000000000..3003965d8c --- /dev/null +++ b/meta/recipes-core/busybox/busybox-1.19.4/wget_dl_dir_fix.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | In cases where busybox wget is invoked with -P <...> and the url ends | ||
2 | in "/", the download directory is ignored (ie the file index.html is | ||
3 | implied), this change enables the -P option for those urls. | ||
4 | |||
5 | Signed-off-by: Amy Fong <amy.fong@windriver.com> | ||
6 | Upstream-Status: Submitted | ||
7 | --- | ||
8 | networking/wget.c | 10 +++++++--- | ||
9 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
10 | |||
11 | --- a/networking/wget.c | ||
12 | +++ b/networking/wget.c | ||
13 | @@ -589,10 +589,14 @@ | ||
14 | if (!(option_mask32 & WGET_OPT_OUTNAME)) { | ||
15 | G.fname_out = bb_get_last_path_component_nostrip(target.path); | ||
16 | /* handle "wget http://kernel.org//" */ | ||
17 | - if (G.fname_out[0] == '/' || !G.fname_out[0]) | ||
18 | - G.fname_out = (char*)"index.html"; | ||
19 | + if (G.fname_out[0] == '/' || !G.fname_out[0]) { | ||
20 | + /* bug: if we provide a default name, we should still look at -P option */ | ||
21 | + if (G.dir_prefix) | ||
22 | + G.fname_out = fname_out_alloc = concat_path_file(G.dir_prefix, "index.html"); | ||
23 | + else | ||
24 | + G.fname_out = (char*)"index.html"; | ||
25 | /* -P DIR is considered only if there was no -O FILE */ | ||
26 | - else { | ||
27 | + } else { | ||
28 | if (G.dir_prefix) | ||
29 | G.fname_out = fname_out_alloc = concat_path_file(G.dir_prefix, G.fname_out); | ||
30 | else { | ||
diff --git a/meta/recipes-core/busybox/busybox_1.19.4.bb b/meta/recipes-core/busybox/busybox_1.19.4.bb index 4271c67834..6e69d22598 100644 --- a/meta/recipes-core/busybox/busybox_1.19.4.bb +++ b/meta/recipes-core/busybox/busybox_1.19.4.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | require busybox.inc | 1 | require busybox.inc |
2 | PR = "r9" | 2 | PR = "r10" |
3 | 3 | ||
4 | SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | 4 | SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ |
5 | file://B921600.patch \ | 5 | file://B921600.patch \ |
@@ -9,6 +9,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
9 | file://watch.in.usr-bin.patch \ | 9 | file://watch.in.usr-bin.patch \ |
10 | file://busybox-udhcpc-no_deconfig.patch \ | 10 | file://busybox-udhcpc-no_deconfig.patch \ |
11 | file://sys_resource.patch \ | 11 | file://sys_resource.patch \ |
12 | file://wget_dl_dir_fix.patch \ | ||
12 | file://find-touchscreen.sh \ | 13 | file://find-touchscreen.sh \ |
13 | file://busybox-cron \ | 14 | file://busybox-cron \ |
14 | file://busybox-httpd \ | 15 | file://busybox-httpd \ |