From c5792194270fbb89b577ef87caf5bb2444c85e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 26 Feb 2023 23:11:40 +0100 Subject: [PATCH] [core] Make PIO detach existing packages instead of overwriting --- platform.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform.py b/platform.py index cbd96d3..8b801aa 100644 --- a/platform.py +++ b/platform.py @@ -83,6 +83,14 @@ class LibretuyaPlatform(PlatformBase): self.custom_opts = {} self.versions = {} + def get_package_spec(self, name, version=None): + # make PlatformIO detach existing package versions instead of overwriting + # TODO this is an ugly hack, it moves old packages to dirs like "library-lwip@src-21d717f2feaca73533f129ce05c9f4d4" + # it should be fixed properly at some point. Maybe ask PIO to allow controlling that somehow? + spec = super().get_package_spec(name, version) + spec._name_is_custom = False + return spec + def configure_default_packages(self, options, targets): from ltchiptool.util.dict import RecursiveDict