From patchwork Mon Nov 14 13:22:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 694519 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tHWRX38PSz9t15 for ; Tue, 15 Nov 2016 00:23:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DEB98C0F72; Mon, 14 Nov 2016 13:23:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fh2bsBDRpUP6; Mon, 14 Nov 2016 13:22:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id CB2528B600; Mon, 14 Nov 2016 13:22:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3C20A1CE92F for ; Mon, 14 Nov 2016 13:22:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 36CDD911B2 for ; Mon, 14 Nov 2016 13:22:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8N9h3nYQninl for ; Mon, 14 Nov 2016 13:22:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id 73AFD8FA71 for ; Mon, 14 Nov 2016 13:22:56 +0000 (UTC) Received: from sagittea.home (LFbn-1-1466-27.w86-253.abo.wanadoo.fr [86.253.91.27]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id 5FBEA42646; Mon, 14 Nov 2016 14:22:54 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Mon, 14 Nov 2016 14:22:35 +0100 Message-Id: <20161114132238.6569-4-jezz@sysmic.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161114132238.6569-1-jezz@sysmic.org> References: <20161114132238.6569-1-jezz@sysmic.org> MIME-Version: 1.0 Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH 3/6] infra: fix 'packages-file-list.txt' with TLP X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Until now, `$(BUILD_DIR)/packages-file-list.txt' was not filled properly when top level parallelization is enabled. Therefore, all scripts that rely on packages-file-list.txt did not work. In order to fix it,this patch place target installation task in a critical section. Signed-off-by: Jérôme Pouiller --- package/pkg-generic.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 987efa6..c5f70e0 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -62,6 +62,9 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time # files currently installed in the target. Note that the MD5 is also # stored, in order to identify if the files are overwritten. define step_pkg_size_start + while ! flock $(BUILD_DIR) -c "[ ! -e $(BUILD_DIR)/.target_lock ] && touch $(BUILD_DIR)/.target_lock"; do \ + sleep 0.5; \ + done (cd $(TARGET_DIR) ; find . -type f -print0 | xargs -0 md5sum) | sort > \ $($(PKG)_DIR)/.br_filelist_before endef @@ -78,6 +81,7 @@ define step_pkg_size_end while read hash file ; do \ echo "$(1),$${file}" >> $(BUILD_DIR)/packages-file-list.txt ; \ done + rm $(BUILD_DIR)/.target_lock endef define step_pkg_size