From patchwork Tue Nov 17 10:25:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Bilas X-Patchwork-Id: 1401464 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=grinn-global.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cb2CK04q1z9sPB for ; Tue, 17 Nov 2020 21:25:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 626F38511C; Tue, 17 Nov 2020 10:25:47 +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 Xkv_xFIqd6TM; Tue, 17 Nov 2020 10:25:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D16DF85143; Tue, 17 Nov 2020 10:25:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 149381BF2F8 for ; Tue, 17 Nov 2020 10:25:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0E5A885143 for ; Tue, 17 Nov 2020 10:25:45 +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 dnLQo7cr15Hi for ; Tue, 17 Nov 2020 10:25:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.megiteam.pl (smtp2.megiteam.pl [213.189.52.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D83558511C for ; Tue, 17 Nov 2020 10:25:43 +0000 (UTC) Received: from host-81-161-192-38.oxylion.net.pl ([81.161.192.38] helo=bartekk-pc.grinndev.ovh) by smtp.megiteam.pl with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86.2_XX) (envelope-from ) id 1keyBA-0007AP-LC; Tue, 17 Nov 2020 11:25:41 +0100 From: Bartosz Bilas To: buildroot@buildroot.org Date: Tue, 17 Nov 2020 11:25:34 +0100 Message-Id: <20201117102534.107484-1-b.bilas@grinn-global.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/dt-utils: install barebox-state lock file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Bilas Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" By default there is no /var/lock/barebox-state file what causes the following error when we try to execute barebox-state command: # barebox-state Failed to open lock-file /var/lock/barebox-state Fix it by adding an empty file in post install hook. Signed-off-by: Bartosz Bilas --- package/dt-utils/dt-utils.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/dt-utils/dt-utils.mk b/package/dt-utils/dt-utils.mk index 25c287d434..454b00e3d6 100644 --- a/package/dt-utils/dt-utils.mk +++ b/package/dt-utils/dt-utils.mk @@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING DT_UTILS_DEPENDENCIES = udev DT_UTILS_AUTORECONF = YES +define DT_UTILS_INSTALL_LOCK_FILE + rm -f $(TARGET_DIR)/var/lock/barebox-state + mkdir -p $(TARGET_DIR)/var/lock + touch $(TARGET_DIR)/var/lock/barebox-state +endef +DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILE + $(eval $(autotools-package))