* [PATCH] busybox: busybox wget -P option ignored
@ 2012-07-17 14:12 Amy Fong
2012-07-17 14:23 ` Paul Eggleton
0 siblings, 1 reply; 4+ messages in thread
From: Amy Fong @ 2012-07-17 14:12 UTC (permalink / raw)
To: openembedded-core
busybox wget -P option ignored
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@windriver.com>
---
busybox-1.19.4/wget_dl_dir_fix.patch | 24 ++++++++++++++++++++++++
busybox_1.19.4.bb | 3 ++-
2 files changed, 26 insertions(+), 1 deletion(-)
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..5f46fed
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.19.4/wget_dl_dir_fix.patch
@@ -0,0 +1,24 @@
+---
+ 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 5b3f356..8a06497 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 = "r7"
+PR = "r8"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://B921600.patch \
@@ -8,6 +8,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://run-parts.in.usr-bin.patch \
file://watch.in.usr-bin.patch \
file://busybox-udhcpc-no_deconfig.patch \
+ file://wget_dl_dir_fix.patch \
file://find-touchscreen.sh \
file://busybox-cron \
file://busybox-httpd \
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] busybox: busybox wget -P option ignored
2012-07-17 14:12 [PATCH] busybox: busybox wget -P option ignored Amy Fong
@ 2012-07-17 14:23 ` Paul Eggleton
2012-07-17 14:30 ` Amy Fong
0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2012-07-17 14:23 UTC (permalink / raw)
To: amy.fong; +Cc: openembedded-core
Hi Amy,
On Tuesday 17 July 2012 10:12:41 Amy Fong wrote:
> busybox-1.19.4/wget_dl_dir_fix.patch | 24 ++++++++++++++++++++++++
For this inner patch, could you please add Signed-off-by and Upstream-Status?
https://wiki.yoctoproject.org/wiki/Best_Known_Methods_%28BKMs%29_for_Package_Updating#Patch_Upstreaming
Thanks,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] busybox: busybox wget -P option ignored
2012-07-17 14:23 ` Paul Eggleton
@ 2012-07-17 14:30 ` Amy Fong
2012-07-20 3:54 ` Saul Wold
0 siblings, 1 reply; 4+ messages in thread
From: Amy Fong @ 2012-07-17 14:30 UTC (permalink / raw)
To: Paul Eggleton, openembedded-core; +Cc: openembedded-core
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@windriver.com>
---
busybox-1.19.4/wget_dl_dir_fix.patch | 30 ++++++++++++++++++++++++++++++
busybox_1.19.4.bb | 3 ++-
2 files changed, 32 insertions(+), 1 deletion(-)
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@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 5b3f356..8a06497 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 = "r7"
+PR = "r8"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://B921600.patch \
@@ -8,6 +8,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://run-parts.in.usr-bin.patch \
file://watch.in.usr-bin.patch \
file://busybox-udhcpc-no_deconfig.patch \
+ file://wget_dl_dir_fix.patch \
file://find-touchscreen.sh \
file://busybox-cron \
file://busybox-httpd \
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] busybox: busybox wget -P option ignored
2012-07-17 14:30 ` Amy Fong
@ 2012-07-20 3:54 ` Saul Wold
0 siblings, 0 replies; 4+ messages in thread
From: Saul Wold @ 2012-07-20 3:54 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Paul Eggleton
On 07/17/2012 07:30 AM, Amy Fong wrote:
> 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@windriver.com>
> ---
> busybox-1.19.4/wget_dl_dir_fix.patch | 30 ++++++++++++++++++++++++++++++
> busybox_1.19.4.bb | 3 ++-
> 2 files changed, 32 insertions(+), 1 deletion(-)
>
> 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@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 5b3f356..8a06497 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 = "r7"
> +PR = "r8"
>
> SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://B921600.patch \
> @@ -8,6 +8,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://run-parts.in.usr-bin.patch \
> file://watch.in.usr-bin.patch \
> file://busybox-udhcpc-no_deconfig.patch \
> + file://wget_dl_dir_fix.patch \
> file://find-touchscreen.sh \
> file://busybox-cron \
> file://busybox-httpd \
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-20 4:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17 14:12 [PATCH] busybox: busybox wget -P option ignored Amy Fong
2012-07-17 14:23 ` Paul Eggleton
2012-07-17 14:30 ` Amy Fong
2012-07-20 3:54 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox