From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id BFA56601B8 for ; Sun, 17 Jan 2016 22:25:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u0HMPNeQ010614 for ; Sun, 17 Jan 2016 22:25:23 GMT 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 wUObEsVbCEEE for ; Sun, 17 Jan 2016 22:25:23 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u0HMPKLU010611 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 17 Jan 2016 22:25:21 GMT Message-ID: <1453069520.27999.28.camel@linuxfoundation.org> From: Richard Purdie To: openembedded-core Date: Sun, 17 Jan 2016 22:25:20 +0000 X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Subject: [PATCH] image: Handle image types containing '-' correctly X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 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: Sun, 17 Jan 2016 22:25:24 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Shell function names can't contain '-' characters, which means our image task names also can't. Add some mapping to use '_' instead of the '-' so images like "rpi-sdimg" work again. Signed-off-by: Richard Purdie diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 58b75da..e81edb2 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -393,6 +393,12 @@ python () { else: subimages.append(realt) + after = 'do_image' + for dep in typedeps[t]: + after += ' do_image_%s' % dep.replace("-", "_") + + t = t.replace("-", "_") + d.setVar('do_image_%s' % t, '\n'.join(cmds)) d.setVarFlag('do_image_%s' % t, 'func', '1') d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') @@ -402,10 +408,6 @@ python () { d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') - after = 'do_image' - for dep in typedeps[t]: - after += ' do_image_%s' % dep - bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after)) bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d) }