On 02/26/2013 10:20 AM, [email protected] wrote:
> Good day, everyone!
> 
> When using ptxdist to "get" a package with an URL with semicolons in it, 
> for example a snapshot from a gitweb repo, anything after the first 
> semicolon
> is interpreted as options to wget. Unfortunately I was unable to find a 
> quoting
> style that prevented this while still handing over a usable URL to wget:
> 
> An example for an URL I want to use:
> http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz
> 
> I'm using ptxdist 2013.01.90 and copied the original kernel.make to my 
> project
> rules, with a custom KERNEL_URL. I tried these variations, and got the 
> following
> (slightly cleaned) results:
> 
> "Naive":
> KERNEL_URL              := 
> http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz
> 
> $ ptxdist-2013.01.90 print KERNEL_URL
> http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz
> $ ptxdist-2013.01.90 get kernel
> ptxdist: error: invalid option 'a=snapshot' to ptxd_make_get_http
> 
> 
> "Doublequoting":
> KERNEL_URL              := 
> "http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz";
> 
> $ ptxdist-2013.01.90 print KERNEL_URL
> http://git.xilinx.com/?p=linux-xlnx.git
> (This downloads an obviously unwanted HTML index page)
> 
> 
> "Singlequoting":
> KERNEL_URL              := 
> 'http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz'
> 
> $ ptxdist-2013.01.90 print KERNEL_URL
> 'http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz'
> $ ptxdist-2013.01.90 get kernel
> Could not download package
> URL: 
> 'http://git.xilinx.com/?p=linux-xlnx.git;a=snapshot;h=04d9378881401e71f83b8b4fea0abd71d33b4052;sf=tgz'
> 
> 
> Using backslashes to escape the semicolons does not work, either, same 
> behaviour
> as in "Naive".
> 
> Using urlencoding as in 
> KERNEL_URL              := 
> http://git.xilinx.com/?p=linux-xlnx.git%3Ba=snapshot%3Bh=04d9378881401e71f83b8b4fea0abd71d33b4052%3Bsf=tgz
> would technically work with ptxdist, but gitweb doesn't seem to decode 
> this,
>  and throws a 404, which seems broken by itself. :(
> 
> Does anybody have a suggestion how to quote semicolons in my URL properly,
> lest they are passed literally to wget instead of being split into 
> options?
> Is there some $(call verbatim,FOO) macro, perchance?

What about using %3B instead of ;
http://www.w3schools.com/TAGS/ref_urlencode.asp

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
ptxdist mailing list
[email protected]

Reply via email to