From patchwork Fri Feb 17 12:42:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 18286 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 5D84ABDB13 for ; Fri, 17 Feb 2023 12:44:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9D59062601; Fri, 17 Feb 2023 13:44:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1676637841; bh=0vQBdhQdaU9imtP+A0TrWQLRN2CSr/ZzOnHmWQsKTEs=; h=To:Date:List-Id:List-Post:From:List-Subscribe:List-Unsubscribe: List-Archive:Reply-To:List-Help:Subject:From; b=nuN/Arqbs1E3KsEQflb+QNUENYmId7FN5azBu+yjOj7nTZuIuOXtgIcnq8XwaBRd4 99+Y+43t76/xpHctPd+Itqqirtcdbqn+VRLVCYj6fpHxH9TibIuGU4rFp7wRIldAzO wKqluadKtEQKvYswtN4hrvfI3788TtLuBKzLueAu765tqam6pIoBJ/aXMiccBeBM3C 6nxFLfpBLv6qHHQELggW/JJy2KFWCG5+OPdVrttE3SbKq9kAG9WxgnEytWyIGI2Kyg 3Uiig8d8kZxYXu6Jzdmbpnpjwiyz5ZSynLj+/MvDfKc4lT9o62sgqwkO1HGkvma066 mBO1Eo4WiGZ2g== To: libcamera-devel@lists.libcamera.org Date: Fri, 17 Feb 2023 13:42:36 +0100 MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Michael Riesch via libcamera-devel From: Michael Riesch Precedence: list X-Mailman-Version: 2.1.29 X-BeenThere: libcamera-devel@lists.libcamera.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Michael Riesch List-Help: Subject: [libcamera-devel] [PATCH] meson: Allow for build metadata in project version Content-Disposition: inline Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The build metadata is split off correctly from the version string obtained with utils/gen-version.sh, but for the meson project version this step is not carried out. Allow for build metadata in the meson project version, which may be used by package maintainers. Signed-off-by: Michael Riesch --- meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 9eee9d39..d518454d 100644 --- a/meson.build +++ b/meson.build @@ -29,9 +29,10 @@ libcamera_version = libcamera_git_version.split('+')[0] # A shallow clone, or a clone without a reachable tag equivalent to the # meson.project_version() could leave the project in a mis-described state. # Produce a warning in this event, and fix to a best effort. -if libcamera_version != meson.project_version() +if libcamera_version != meson.project_version().split('+')[0] warning('The sources disagree about the version: ' - + libcamera_version + ' != ' + meson.project_version()) + + libcamera_version + ' != ' + + meson.project_version().split('+')[0]) summary({'libcamera git version' : libcamera_git_version, 'Source version match' : false, @@ -40,9 +41,9 @@ if libcamera_version != meson.project_version() # Replace the version components reported by git with the release version, # but keep all trailing information supplied by git. - libcamera_git_version = (meson.project_version() + + libcamera_version = meson.project_version().split('+')[0] + libcamera_git_version = (libcamera_version + libcamera_git_version.strip(libcamera_version)) - libcamera_version = meson.project_version() # Append a marker to show we have modified this version string libcamera_git_version += '-nvm'