From patchwork Thu Aug 4 13:21:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16966 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 3BD3AC3272 for ; Thu, 4 Aug 2022 13:21:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0098E6332D; Thu, 4 Aug 2022 15:21:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659619285; bh=5BIJqtpRNphTxpOdz1YKoDvfHEhXKO+dboprbhwo2ns=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=DxT8kKIUvo/GLOdINrS4Ny9qV/mbwTxCvDOzZBYG1xHFescJQV8OzXm+5XOiGGMSK WRR+9pLjYvXsPMZSHLEhudHOyOCSaNcIdcd0GQRfymVaMtLKxqR+TnSRRIxITZ3ziS xBbaS1rqNqefQ6u/n+r4lRCs0FBsXPbLG/bCRbeGogu/WC9EGOly+DF0EPZkzwiddD DAy8qN2aDLuigSAkfeliaLqh3XKRMgmtQhOuHN4NUzTgWCSsENDPp3F9VaEQBwUNJm MWE70EG5+W9LlS1Rt6XimJuRZPbkvHUcBBpS4uSFrtNWubl3xfVkFN5rtGXad8gynS XQZosBDQsYpdQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 50EDB6332F for ; Thu, 4 Aug 2022 15:21:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XbLC7p/L"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C98956BD; Thu, 4 Aug 2022 15:21:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659619282; bh=5BIJqtpRNphTxpOdz1YKoDvfHEhXKO+dboprbhwo2ns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XbLC7p/L81dia0PRi4hCO6kO+wimrFCzCQh1tDBDlOBePavLcXKq4ye9b6UI5KOkf C5Yv/1gVGUgoU3OOfW/mZzlmLCsSWMpILQeIGDQnNLUeVdrC6DEV4jWbufdImi8RwJ x0ozZN0jJWMZG9DMJ0BZL06Lpg7ad0ywB9u5s4RA= To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Aug 2022 16:21:12 +0300 Message-Id: <20220804132112.17604-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220804132112.17604-1-laurent.pinchart@ideasonboard.com> References: <20220804132112.17604-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libcamera: Switch internal YAML files to YAML 1.1 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" The python3-yaml package shipped by Debian is based on libyaml 0.2.2, which doesn't support YAML 1.2. It is documented as such: Python3-yaml is a complete YAML 1.1 parser and emitter for Python3. For some reasons the internal YAML files used to generate format- and control-related source files still parse correctly, despite the YAML 1.2 directive at the beginning. Still, given that we don't use any feature of YAML 1.2, and that the tuning data files now use YAML 1.1, switch the internal YAML files to version 1.1 as well for consistency. The main drawback of YAML 1.1 is that the unquoted literal strings Yes, No, On and Off will be parsed as booleans. We need to be careful to avoid those values in YAML files, until libcamera can switch to YAML 1.2 once more recent versions of libyaml get shipped by the distributions we want to support. Signed-off-by: Laurent Pinchart Reviewed-by: Florian Sylvestre Reviewed-by: Kieran Bingham --- src/libcamera/control_ids.yaml | 2 +- src/libcamera/formats.yaml | 2 +- src/libcamera/property_ids.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index ecab3ae97260..5510feefdfeb 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -2,7 +2,7 @@ # # Copyright (C) 2019, Google Inc. # -%YAML 1.2 +%YAML 1.1 --- # Unless otherwise stated, all controls are bi-directional, i.e. they can be # set through Request::controls() and returned out through Request::metadata(). diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml index d3fbf5f47211..e586cde1d705 100644 --- a/src/libcamera/formats.yaml +++ b/src/libcamera/formats.yaml @@ -2,7 +2,7 @@ # # Copyright (C) 2020, Google Inc. # -%YAML 1.2 +%YAML 1.1 --- formats: - R8: diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml index 11b7ebdc3105..cb55e0ed2283 100644 --- a/src/libcamera/property_ids.yaml +++ b/src/libcamera/property_ids.yaml @@ -2,7 +2,7 @@ # # Copyright (C) 2019, Google Inc. # -%YAML 1.2 +%YAML 1.1 --- controls: - Location: