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 953F460124 for ; Tue, 29 Mar 2016 15:09:53 +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 u2TF9s69001741 for ; Tue, 29 Mar 2016 16:09:54 +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 TXfdZYLBXm4Q for ; Tue, 29 Mar 2016 16:09:54 +0100 (BST) 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 u2TF9qvI001737 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 29 Mar 2016 16:09:53 +0100 Message-ID: <1459264192.21672.27.camel@linuxfoundation.org> From: Richard Purdie To: bitbake-devel Date: Tue, 29 Mar 2016 16:09:52 +0100 X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Subject: [PATCH] cooker: Ensure bbappend order is deterministic X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 15:09:56 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Currently bbappend files in a layer are applied in the order they're found on disk (as reported by glob) which means things are not deterministic. By sorting the glob results, the order becomes deterministic, the parsing order for .bb files also should be deterministic as a result of this change. [YOCTO #9138] Signed-off-by: Richard Purdie diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 3014697..6601dff 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1768,7 +1768,8 @@ class CookerCollectFiles(object): globbed = glob.glob(f) if not globbed and os.path.exists(f): globbed = [f] - for g in globbed: + # glob gives files in order on disk. Sort to be deterministic. + for g in sorted(globbed): if g not in newfiles: newfiles.append(g)