From patchwork Thu Mar 9 17:21:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18377 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 BDF1CBE080 for ; Thu, 9 Mar 2023 17:21:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 19B7F626B2; Thu, 9 Mar 2023 18:21:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1678382474; bh=bZyqzXMdRevwV1hSrLiVO/prhd+lkRTKsb+AUEEegUQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=b55mt6YcIc+m46/j0fAD+57qct2+ivRtUNE4c178+5DJRz3fDFwMFFzUjPwXyIhSc z08Y5FkBwPVtTPy0P8D4Q0vjwZ9lnSrunJxz8KcnhzzFC/KcFWNEDw/KfVVDhWOyFK LAKzEfeP/7GDxp4qIJdoOuJ7GjTW2klWslnmKQe7iEXRjYKAumPvyHx1ohovBJgTRW 3/3AYDpWCqy0sX66i3/phPiuVYsmt93EL7rsyn7RSkcCT9P+qtdYdUpEMpPPJ3Fj/R su3wNPYSKujXKngyXUaWlyqcjbUsDkVgBKB73sMwLMiM5IzpMTKpgR6R+VJAJjDpV0 pyiVNHqygIFdg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6570361ED7 for ; Thu, 9 Mar 2023 18:21:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="uSsLcUNV"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F1A09589; Thu, 9 Mar 2023 18:21:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1678382472; bh=bZyqzXMdRevwV1hSrLiVO/prhd+lkRTKsb+AUEEegUQ=; h=From:To:Cc:Subject:Date:From; b=uSsLcUNVqwaiedBaCjkPJdvbGu2NQ5EO3KQZLAvNtWyDnbJO0EAz4BSQjWTmqSoSK +pWBmgq+oyYxoG3TaA3cNLZZPARotv2V3nugPOQMcdI36fTxTQ4bfuKa7jA3clslhC 5SbPcknElMSORTBZ/kv4Xbn+pcpMca9FlJWqsS1w= To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Mar 2023 19:21:15 +0200 Message-Id: <20230309172115.15216-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] meson: Fix git version parsing 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 Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When extracting the build metadata from the git version, we use the string strip() method to remove the version prefix. This is incorrect, as the strip() method takes a set of characters to be removed, not a literal string. Fix it by splitting the git version string on the '+' character and keeping the suffix. Fixes: 02518e598e8f ("meson: Rewrite .replace usage") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Michael Riesch --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: f852b7fbc4960ea83bab49b75408fb13462db8ba diff --git a/meson.build b/meson.build index 0f89b45a0169..189e97736d90 100644 --- a/meson.build +++ b/meson.build @@ -41,8 +41,8 @@ if libcamera_version != project_version # Replace the version components reported by git with the release version, # but keep all trailing information supplied by git. - libcamera_git_version = (project_version + - libcamera_git_version.strip(libcamera_version)) + libcamera_git_version = (project_version + '+' + + libcamera_git_version.split('+')[1]) libcamera_version = project_version # Append a marker to show we have modified this version string