mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
bitbake: fetch2/wget: fix downloadfilename parameter
When using a download filename with characters which can be interpreted
by the shell ('(', ')', '&', ';', ...) the command fails. Quoting the
filename fixes the issue.
(Bitbake rev: ed652dce5200161068eccdbfaaaefde33136eb09)
Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c37a1bc05e
commit
b9ce68a5d7
@@ -12,6 +12,7 @@ BitBake build tools.
|
|||||||
#
|
#
|
||||||
# Based on functions from the base bb module, Copyright 2003 Holger Schurig
|
# Based on functions from the base bb module, Copyright 2003 Holger Schurig
|
||||||
|
|
||||||
|
import shlex
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
import os
|
import os
|
||||||
@@ -91,9 +92,9 @@ class Wget(FetchMethod):
|
|||||||
fetchcmd = self.basecmd
|
fetchcmd = self.basecmd
|
||||||
|
|
||||||
if 'downloadfilename' in ud.parm:
|
if 'downloadfilename' in ud.parm:
|
||||||
dldir = d.getVar("DL_DIR")
|
localpath = os.path.join(d.getVar("DL_DIR"), ud.localfile)
|
||||||
bb.utils.mkdirhier(os.path.dirname(dldir + os.sep + ud.localfile))
|
bb.utils.mkdirhier(os.path.dirname(localpath))
|
||||||
fetchcmd += " -O " + dldir + os.sep + ud.localfile
|
fetchcmd += " -O %s" % shlex.quote(localpath)
|
||||||
|
|
||||||
if ud.user and ud.pswd:
|
if ud.user and ud.pswd:
|
||||||
fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd)
|
fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd)
|
||||||
|
|||||||
Reference in New Issue
Block a user