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 5C9B673223 for ; Tue, 26 May 2015 10:42:40 +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 t4QAgfgJ030483 for ; Tue, 26 May 2015 11:42:41 +0100 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 24i_TXZCM8aV for ; Tue, 26 May 2015 11:42:41 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t4QAgQdV030472 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 26 May 2015 11:42:37 +0100 Message-ID: <1432636946.404.3.camel@linuxfoundation.org> From: Richard Purdie To: openembedded-core Date: Tue, 26 May 2015 11:42:26 +0100 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Subject: [PATCH] bitbake.conf: Use immediate expansion for os.uname() 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: Tue, 26 May 2015 10:42:41 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Use immediate expansion for BUILD_ARCH and BUILD_OS since there is no point in repeatedly calling os.uname() throughout parsing. This is worth around 2% of parsing time, small but measurable. Signed-off-by: Richard Purdie diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 8653a7f..eb0208d 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -81,8 +81,10 @@ ROOT_HOME ??= "/home/root" # Architecture-dependent build variables. ################################################################## -BUILD_ARCH = "${@os.uname()[4]}" -BUILD_OS = "${@os.uname()[0].lower()}" +# Immediate expansion since there is no point in reapeatedly calling +# os.uname() throughout parsing +BUILD_ARCH := "${@os.uname()[4]}" +BUILD_OS := "${@os.uname()[0].lower()}" BUILD_VENDOR = "" BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" BUILD_PREFIX = ""