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 1SSta6-0002tQ-H6 for bitbake-devel@lists.openembedded.org; Fri, 11 May 2012 19:24:42 +0200 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q4BHElhb028367 for ; Fri, 11 May 2012 18:14:47 +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 18512-06 for ; Fri, 11 May 2012 18:14:43 +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 q4BHEeFl028361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 May 2012 18:14:41 +0100 Message-ID: <1336756480.2494.238.camel@ted> From: Richard Purdie To: bitbake-devel Date: Fri, 11 May 2012 18:14:40 +0100 X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] bitbake/fetch2/git: Don't set the branch name to None, that makes no sense 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, 11 May 2012 17:24:42 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit With floating revisions and no specified branch, the fetcher could fail with some obtuse errors. This was due to the branch name being set to None which makes no sense. This patch reworks some conditions to avoid this. Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index bcc0da5..5efdfa9 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -123,7 +123,8 @@ class Git(FetchMethod): for name in ud.names: # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]): - ud.branches[name] = ud.revisions[name] + if ud.revisions[name]: + 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('/', '.'))