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 1TYHL4-0001gd-No for openembedded-core@lists.openembedded.org; Tue, 13 Nov 2012 15:19:43 +0100 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id qADE5lIY004373 for ; Tue, 13 Nov 2012 14:05:47 GMT 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 03956-05 for ; Tue, 13 Nov 2012 14:05:43 +0000 (GMT) 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 qADE5d1K004362 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 13 Nov 2012 14:05:40 GMT Message-ID: <1352815540.24487.124.camel@ted> From: Richard Purdie To: openembedded-core Date: Tue, 13 Nov 2012 14:05:40 +0000 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] sstate: Be consistent about sstate-inputdirs/outputdirs ending with '/' X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 14:19:43 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit The manifest file can become corrupted if sstate-inputdirs and sstate-outputdirs don't have matching endings. This patch ensures that even if set incorrectly, the code functions as intended, thereby handling manifest corruption safely. Signed-off-by: Richard Purdie --- diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 744cc14..12c9c60 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -111,6 +111,10 @@ def sstate_state_fromvars(d, task = None): def sstate_add(ss, source, dest, d): srcbase = os.path.basename(source) + if not source.endswith: + source = source + "/" + if not dest.endswith: + dest = dest + "/" ss['dirs'].append([srcbase, source, dest]) return ss