{"id":18322,"url":"https://patchwork.libcamera.org/api/1.1/patches/18322/?format=json","web_url":"https://patchwork.libcamera.org/patch/18322/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<mailman.45.1677705495.25031.libcamera-devel@lists.libcamera.org>","date":"2023-03-01T21:18:00","name":"[libcamera-devel,v3] meson: Align handling of build metadata","commit_ref":"f852b7fbc4960ea83bab49b75408fb13462db8ba","pull_url":null,"state":"accepted","archived":false,"hash":"298184642e802217bec8e934b00388f1b9da2ce3","submitter":{"id":135,"url":"https://patchwork.libcamera.org/api/1.1/people/135/?format=json","name":"Michael Riesch","email":"michael.riesch@wolfvision.net"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18322/mbox/","series":[{"id":3779,"url":"https://patchwork.libcamera.org/api/1.1/series/3779/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3779","date":"2023-03-01T21:18:00","name":"[libcamera-devel,v3] meson: Align handling of build metadata","version":3,"mbox":"https://patchwork.libcamera.org/series/3779/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18322/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18322/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E2DC4BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Mar 2023 21:18:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 28F4A6266A;\n\tWed,  1 Mar 2023 22:18:16 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677705496;\n\tbh=v+5eNk3KwvMHNvYshM9LusGZFn03mJEY1PEe2a6VnQE=;\n\th=To:Date:List-Id:List-Post:From:List-Subscribe:List-Unsubscribe:\n\tList-Archive:Reply-To:List-Help:Subject:From;\n\tb=sM2wrQOtn2pGu9usgeBSVM8rokBj10ps5DzacRhGP6ysw3GPlaYubynP6KVOG7HG5\n\tZ4uoCH048doDs9fq7PSJCNSvvxEvGi+2PvLtGaS0uqqkhc9rlTwRjJvWnuirJvtnBb\n\tB1Dpi4PRhuKCu7sbqxqp4xAoXYJFhGEDC8UbTDZ+li13JAyeaHF5AhHUbewq0ZRgru\n\tAPvNB+MUGzOlqI96xy+MHKktClfqs1dgba5r29AJolG+ft17zkr/OZ2+Lj/AflJNYQ\n\tpfyxdiqPMl6GHoSY5gYmqBkOBDv/6XDRbRgTANeH6bjMLNGjUiS44RaEcVrel9qL82\n\tfOpL2gUkfjVuA==","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  1 Mar 2023 22:18:00 +0100","MIME-Version":"1.0","Message-ID":"<mailman.45.1677705495.25031.libcamera-devel@lists.libcamera.org>","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","From":"Michael Riesch via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Precedence":"list","X-Mailman-Version":"2.1.29","X-BeenThere":"libcamera-devel@lists.libcamera.org","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","Reply-To":"Michael Riesch <michael.riesch@wolfvision.net>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","Subject":"[libcamera-devel] [PATCH v3] meson: Align handling of build metadata","Content-Type":"message/rfc822","Content-Disposition":"inline","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The build metadata is split off correctly from the version string\nobtained with utils/gen-version.sh, but for the meson project version\nthis step is not carried out. However, since libcamera uses Semantic\nVersioning, it should be possible to add build metadata to the meson\nproject version. Align the handling of the build metadata to resolve\nthis mismatch.\n\nSigned-off-by: Michael Riesch <michael.riesch@wolfvision.net>\n---\nChanges in v3:\n - revert re-ordering of libcamera_version assignment\n\nv2 of this series follows a discussion with kbingham in #libcamera\n\nChanges in v2:\n - revise patch message to reflect the current mismatch and the\n   proposed fix better\n - introduce the 'project_version' variable to avoid three .split()\n   operations\n\n meson.build | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)","diff":"diff --git a/meson.build b/meson.build\nindex 9eee9d39..0f89b45a 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -25,13 +25,14 @@ if libcamera_git_version == ''\n endif\n \n libcamera_version = libcamera_git_version.split('+')[0]\n+project_version = meson.project_version().split('+')[0]\n \n # A shallow clone, or a clone without a reachable tag equivalent to the\n # meson.project_version() could leave the project in a mis-described state.\n # Produce a warning in this event, and fix to a best effort.\n-if libcamera_version != meson.project_version()\n+if libcamera_version != project_version\n     warning('The sources disagree about the version: '\n-            + libcamera_version + ' != ' + meson.project_version())\n+            + libcamera_version + ' != ' + project_version)\n \n     summary({'libcamera git version' : libcamera_git_version,\n              'Source version match' : false,\n@@ -40,9 +41,9 @@ if libcamera_version != meson.project_version()\n \n     # Replace the version components reported by git with the release version,\n     # but keep all trailing information supplied by git.\n-    libcamera_git_version = (meson.project_version() +\n+    libcamera_git_version = (project_version +\n                              libcamera_git_version.strip(libcamera_version))\n-    libcamera_version = meson.project_version()\n+    libcamera_version = project_version\n \n     # Append a marker to show we have modified this version string\n     libcamera_git_version += '-nvm'\n","prefixes":["libcamera-devel","v3"]}