From c69b88bb554694c4059057717c10ee45f46580df Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Wed, 15 Sep 2021 19:10:42 +0200 Subject: [PATCH] Fix platformio.ini parser used by container build --- docker/platformio_install_deps.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/docker/platformio_install_deps.py b/docker/platformio_install_deps.py index 6f3e9f28d5..6b5860ffc5 100755 --- a/docker/platformio_install_deps.py +++ b/docker/platformio_install_deps.py @@ -3,18 +3,11 @@ # all platformio libraries in the global storage import configparser -import re import subprocess import sys -config = configparser.ConfigParser() +config = configparser.ConfigParser(inline_comment_prefixes=(';', )) config.read(sys.argv[1]) -libs = [] -for line in config['common']['lib_deps'].splitlines(): - # Format: '1655@1.0.2 ; TinyGPSPlus (has name conflict)' (includes comment) - m = re.search(r'([a-zA-Z0-9-_/]+@[0-9\.]+)', line) - if m is None: - continue - libs.append(m.group(1)) +libs = [x for x in config['common']['lib_deps'].splitlines() if len(x) != 0] -subprocess.check_call(['platformio', 'lib', '-g', 'install', *libs]) +subprocess.check_call(['platformio', 'lib', '-g', 'uninstall', *libs])