resources: Workaround for duplicate yarn repository

This commit is contained in:
Félix Piédallu 2024-08-30 15:33:55 +02:00
parent 72a13c7b48
commit 317a7f98b4

View file

@ -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: