From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dan.rpsys.net ([93.97.175.187]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1U66gI-0004IJ-Uy for bitbake-devel@lists.openembedded.org; Thu, 14 Feb 2013 22:49:35 +0100 Received: from localhost (dan.rpsys.net [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-2.1ubuntu1) with ESMTP id r1ELdRkq013019 for ; Thu, 14 Feb 2013 21:39:28 GMT X-Virus-Scanned: Debian amavisd-new at dan.rpsys.net Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29aUuD907zwH for ; Thu, 14 Feb 2013 21:39:27 +0000 (GMT) Received: from [192.168.3.10] (rpvlan0 [192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-2.1ubuntu1) with ESMTP id r1ELdFqr013011 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT) for ; Thu, 14 Feb 2013 21:39:20 GMT Message-ID: <1360877584.11225.122.camel@ted> From: Richard Purdie To: bitbake-devel Date: Thu, 14 Feb 2013 21:33:04 +0000 X-Mailer: Evolution 3.6.3-1 Mime-Version: 1.0 Subject: [PATCH] wget: Only use -O option when not spidering X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 21:49:37 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit If we pass the -O option whilst spidering, empty files are created which is not desired. We also need to ensure any subdirectories are created when using the downloadfilename parameter. Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 2808df6..24eec31 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py @@ -65,7 +65,8 @@ class Wget(FetchMethod): basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate" - if 'downloadfilename' in ud.parm: + if not checkonly and 'downloadfilename' in ud.parm: + bb.utils.mkdirhier(os.path.dirname(ud.localfile)) basecmd += " -O ${DL_DIR}/" + ud.localfile if checkonly: