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 6243C607BB for ; Fri, 10 Jul 2015 13:11:32 +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 t6ADArk0010675 for ; Fri, 10 Jul 2015 14:11:32 +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 87fA8EjpSWP7 for ; Fri, 10 Jul 2015 14:11:32 +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 t6ADBGRJ010749 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 10 Jul 2015 14:11:28 +0100 Message-ID: <1436533876.3310.7.camel@linuxfoundation.org> From: Richard Purdie To: openembedded-core Date: Fri, 10 Jul 2015 14:11:16 +0100 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Subject: lib/oe/recipeutils: Ensure order of data store doesn't influence the result 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: Fri, 10 Jul 2015 13:11:33 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit The order of the keys from the data store is not prescribed. If target_datadir comes before datadir the selftests fail since the 'wrong' variable is used for substitutions. This highlights an issue with the replace_dir_vars() function. Fix this. Signed-off-by: Richard Purdie diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index d8094c8..ccec2a1 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py @@ -620,7 +620,7 @@ def replace_dir_vars(path, d): for var in d: if var.endswith('dir') and var.lower() == var: value = d.getVar(var, True) - if value.startswith('/') and not '\n' in value: + if value.startswith('/') and not '\n' in value and value not in dirvars: dirvars[value] = var for dirpath in sorted(dirvars.keys(), reverse=True): path = path.replace(dirpath, '${%s}' % dirvars[dirpath])