DOWNLOAD_WGET: use -O instead of -P to set output file
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 14 Feb 2012 09:56:52 +0000 (10:56 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 14 Feb 2012 11:07:27 +0000 (12:07 +0100)
Some URLs use url-encoded arguments to specify the file to download.
Wget will then use an output file name which includes all the ampersands
and such.  However, this is not what we see from buildroot.

E.g.:
FOO_SITE="http://git.foo.com/?p=foo.git;a=blob;f="
FOO_SOURCE="foo.tgz"

wget will download this into $(DL_DIR)/index.html?p=foo.git;a=blob;f=foo.tgz
buildroot thinks it's in $(DL_DIR)/foo.tgz

To make sure the view of wget and buildroot are consistent, specify
the output file explicitly.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Makefile.package.in

index 33461b4dcbf62791ccfeeec9ec0519db5ef15486..ea44c6cef3800e4c8103f26f6a18b1e5927f0710 100644 (file)
@@ -238,7 +238,7 @@ endef
 
 define DOWNLOAD_WGET
        test -e $(DL_DIR)/$(2) || \
-       $(WGET) -P $(DL_DIR) $(call qstrip,$(1))/$(2)
+       $(WGET) -O $(DL_DIR)/$(2) $(call qstrip,$(1))/$(2)
 endef
 
 define SOURCE_CHECK_WGET