From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1Si2ba-0000Vg-6e for bitbake-devel@lists.openembedded.org; Fri, 22 Jun 2012 14:04:50 +0200 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q5MBs36g001140 for ; Fri, 22 Jun 2012 12:54:03 +0100 Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31946-05 for ; Fri, 22 Jun 2012 12:53:58 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q5MBrtq7001134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 22 Jun 2012 12:53:56 +0100 Message-ID: <1340366036.394.16.camel@ted> From: Richard Purdie To: bitbake-devel Date: Fri, 22 Jun 2012 12:53:56 +0100 X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] fetch2: Ensure star character doesn't end up in mirror tarball names 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: Fri, 22 Jun 2012 12:04:50 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit If '*' does end up in mirror urls accidently, some strange things can break since supports_checksum() looks for this, ud.localpath can then get ignored and this can lead to empty directories being downloaded "successfully". '*' is a special case for file urls only at this point so remove any entries that accidentlly make it in through url mapping. Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index e6f55f8..0b256ae 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -492,7 +492,7 @@ def build_mirroruris(origud, mirrors, ld): replacements["HOST"] = origud.host replacements["PATH"] = origud.path replacements["BASENAME"] = origud.path.split("/")[-1] - replacements["MIRRORNAME"] = origud.host.replace(':','.') + origud.path.replace('/', '.') + replacements["MIRRORNAME"] = origud.host.replace(':','.') + origud.path.replace('/', '.').replace('*', '.') def adduri(uri, ud, uris, uds): for line in mirrors: diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 1c9a01c..3676cc3 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -130,7 +130,7 @@ class Git(FetchMethod): ud.branches[name] = ud.revisions[name] ud.revisions[name] = self.latest_revision(ud.url, ud, d, name) - gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.')) + gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.').replace('*', '.')) # for rebaseable git repo, it is necessary to keep mirror tar ball # per revision, so that even the revision disappears from the # upstream repo in the future, the mirror will remain intact and still