From 317a7f98b4785b3a479ffd39ec520b4f39e2589d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 30 Aug 2024 15:33:55 +0200 Subject: [PATCH] resources: Workaround for duplicate yarn repository --- src/utils/resources.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utils/resources.py b/src/utils/resources.py index 779e5d48f..65c9dafe5 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -1214,6 +1214,15 @@ class AptDependenciesAppResource(AppResource): key: values for key, values in self.extras.items() if values["packages"] } + # Yarn repository is now provided by the core. + # Let's "move" any extra apt resources depending on yarn to the standard packages list. + for key in list(self.extras.keys()): + if self.extras[key]["repo"] == "deb https://dl.yarnpkg.com/debian/ stable main" \ + and self.extras[key]["packages"] == [ "yarn" ]: + self.packages.append("yarn") + del self.extras[key] + + def provision_or_update(self, context: Dict = {}): if self.helpers_version >= 2.1: