From c2c9a61fed0420e6e848ca6facdf31c8256d168c Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Tue, 12 Sep 2023 09:48:41 +0200 Subject: [PATCH] Deprecate stringy list for manifest v3 --- package_linter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package_linter.py b/package_linter.py index 6e25c7e..1cfbabb 100755 --- a/package_linter.py +++ b/package_linter.py @@ -1967,10 +1967,11 @@ class Manifest(TestSuite): apt_packages = resources["apt"].get("packages", []) if isinstance(apt_packages, str): - yield Warning( - "The packages list should be a TOML list, like [ 'package1', 'package2' ]. Using a string separated with commas/spaces will be deprecated in the future." - ) apt_packages = [value.strip() for value in re.split(' |,',apt_packages)] + if self.manifest["packaging_format"] > 2: + yield Error( + "The `resources.apt.packages` list should be a TOML list, like [ 'package1', 'package2' ]. Try replacing your entry with:packages = \n" + str(apt_packages) + ) if dbtype == "mysql" and "mariadb-server" not in apt_packages: yield Warning(