From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (dan.rpsys.net [93.97.175.187]) by mail.openembedded.org (Postfix) with ESMTP id 95D296098F for ; Mon, 17 Jun 2013 14:57:20 +0000 (UTC) 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 r5HF3IiN032761 for ; Mon, 17 Jun 2013 16:03:19 +0100 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 vCpwklV78oUx for ; Mon, 17 Jun 2013 16:03:18 +0100 (BST) 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 r5HF3CRK032757 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT) for ; Mon, 17 Jun 2013 16:03:13 +0100 Message-ID: <1371481023.20823.105.camel@ted> From: Richard Purdie To: openembedded-core Date: Mon, 17 Jun 2013 15:57:03 +0100 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Subject: [PATCH] utils.bbclass: Tweak create_wrapper 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: Mon, 17 Jun 2013 14:57:21 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Currently the full path is specified to exec however this may incorporate a build path which in the nativesdk case, is not transformed to a target system path. This leads to failures due to incorrect paths. This patch ensures the full build path is not encoded into the wrapper script. Signed-off-by: Richard Purdie --- diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index cf8893f..e873c53 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass @@ -282,12 +282,12 @@ create_wrapper () { echo "Generating wrapper script for $cmd" mv $cmd $cmd.real - cmdname=`basename $cmd`.real + cmdname=`basename $cmd` cat <$cmd #!/bin/bash realpath=\`readlink -fn \$0\` export $@ -exec -a $cmd \`dirname \$realpath\`/$cmdname "\$@" +exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@" END chmod +x $cmd }