[oe-commits] Amy Fong : busybox: busybox wget -P option ignored

git at git.openembedded.org git at git.openembedded.org
Thu Jul 19 16:20:28 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 95fd02de0aee0a1907b51f9ccda260d483e6e292
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=95fd02de0aee0a1907b51f9ccda260d483e6e292

Author: Amy Fong <amy.fong at windriver.com>
Date:   Tue Jul 17 10:30:34 2012 -0400

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.

Signed-off-by: Amy Fong <amy.fong at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 .../busybox/busybox-1.19.4/wget_dl_dir_fix.patch   |   30 ++++++++++++++++++++
 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 0000000..3003965
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.19.4/wget_dl_dir_fix.patch
@@ -0,0 +1,30 @@
+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.
+
+Signed-off-by: Amy Fong <amy.fong at windriver.com>
+Upstream-Status: Submitted
+---
+ networking/wget.c |   10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/networking/wget.c
++++ b/networking/wget.c
+@@ -589,10 +589,14 @@
+ 	if (!(option_mask32 & WGET_OPT_OUTNAME)) {
+ 		G.fname_out = bb_get_last_path_component_nostrip(target.path);
+ 		/* handle "wget http://kernel.org//" */
+-		if (G.fname_out[0] == '/' || !G.fname_out[0])
+-			G.fname_out = (char*)"index.html";
++		if (G.fname_out[0] == '/' || !G.fname_out[0]) {
++			/* bug: if we provide a default name, we should still look at -P option */
++			if (G.dir_prefix)
++				G.fname_out = fname_out_alloc = concat_path_file(G.dir_prefix, "index.html");
++			else
++				G.fname_out = (char*)"index.html";
+ 		/* -P DIR is considered only if there was no -O FILE */
+-		else {
++		} else {
+ 			if (G.dir_prefix)
+ 				G.fname_out = fname_out_alloc = concat_path_file(G.dir_prefix, G.fname_out);
+ 			else {
diff --git a/meta/recipes-core/busybox/busybox_1.19.4.bb b/meta/recipes-core/busybox/busybox_1.19.4.bb
index 4271c67..6e69d22 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 @@
 require busybox.inc
-PR = "r9"
+PR = "r10"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://B921600.patch \
@@ -9,6 +9,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://watch.in.usr-bin.patch \
            file://busybox-udhcpc-no_deconfig.patch \
            file://sys_resource.patch \
+           file://wget_dl_dir_fix.patch \
            file://find-touchscreen.sh \
            file://busybox-cron \
            file://busybox-httpd \





More information about the Openembedded-commits mailing list