Merge pull request #1888 from YunoHost/fix_repo_extra_yarn

Add a workaround for warnings issued for yarn when adding extra repo …
This commit is contained in:
Alexandre Aubin 2024-08-30 15:42:50 +02:00 committed by GitHub
commit dd1853ee15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1214,6 +1214,15 @@ class AptDependenciesAppResource(AppResource):
key: values for key, values in self.extras.items() if values["packages"] 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 = {}): def provision_or_update(self, context: Dict = {}):
if self.helpers_version >= 2.1: if self.helpers_version >= 2.1: