From patchwork Thu Jan 4 15:15:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19365 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 75BF7C3240 for ; Thu, 4 Jan 2024 15:15:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 232AE62B61; Thu, 4 Jan 2024 16:15:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1704381349; bh=xnUJqPvvZTj9wpbXA4SArPT15weWkxSReXZ/K/b1w4E=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BOkfTMw6bmFf2wKHmsqKhn3IHBLzFyNE5kpR0HG88KssRpypHDbGlL1X7wmwVvu5b cvhRCwtyTj6ohYRvOCTC/upB4d51/VZjzQSpEAY4t8c2Tahcmj+HXho1CMWJRQXQiz VaqHl31rhEqninBqBW+JdacQ73mwUn16SrrsnKzbWGl8bPiI+loMwvT8FuJKdDy9CI jbm87kZSEu2/afsCBySkdQp3FybYxRoI+dlN+9GYbPkmLXwHuX+QnNCEkjYYYJBRov 4RmB4K0Hq8h5pyuUrqcBw5OFUbPv3KVB8REu7ZnCuR0/MhzJQeQBeyYiC1BTpKAtcJ 3oTVtPsZLy3JQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BAD961D82 for ; Thu, 4 Jan 2024 16:15:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DNlLobYB"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B75FD49; Thu, 4 Jan 2024 16:14:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1704381284; bh=xnUJqPvvZTj9wpbXA4SArPT15weWkxSReXZ/K/b1w4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DNlLobYBAIaCbfBzVlaZt8UCxcmMvtN+bqB7DxUpcJ7AKGH9nXbMRSdt4PbbzuXtE kSmentIMCQTNQr4EyB94JbHSlwEVrm3wApyav9g+WiIHd6SIbj2O44KnB5gEU3Me4r jcN42Yff+ZBcxp3Tlzd5WOMZ0YQPVpprXVrEk9C4= To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Jan 2024 17:15:44 +0200 Message-ID: <20240104151548.2589-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240104151548.2589-1-laurent.pinchart@ideasonboard.com> References: <20240104151548.2589-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/8] utils: update-mojo.sh: Reject a dirty libcamera tree X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Cc: Khem Raj Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If the libcamera tree is dirty committing the result of the mojo update will be messy. Bail out in that case. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Kieran Bingham --- utils/update-mojo.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh index b6fbc6d14f2d..25a280e04331 100755 --- a/utils/update-mojo.sh +++ b/utils/update-mojo.sh @@ -15,6 +15,12 @@ chromium_dir="$(realpath "$1")" cd "${ipc_dir}/../../" +# Reject dirty libcamera trees +if [ -n "$(git status --porcelain -uno)" ] ; then + echo "libcamera tree is dirty" + exit 1 +fi + if [ ! -d "${chromium_dir}/mojo" ] ; then echo "Directory ${chromium_dir} doesn't contain mojo" exit 1 @@ -28,7 +34,7 @@ fi # Get the chromium commit id version=$(git -C "${chromium_dir}" rev-parse --short HEAD) -# Reject dirty trees +# Reject dirty chromium trees if [ -n "$(git -C "${chromium_dir}" status --porcelain)" ] ; then echo "Chromium tree in ${chromium_dir} is dirty" exit 1