From e2e9a7a0339ae269a239156972595d6ff590cebe Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 22 Mar 2019 17:47:32 +0100 Subject: [PATCH] Remove all deprecated lists, not just 'yunohost' --- .../0009_migrate_to_apps_json.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/yunohost/data_migrations/0009_migrate_to_apps_json.py b/src/yunohost/data_migrations/0009_migrate_to_apps_json.py index 364497b46..b5ae1130b 100644 --- a/src/yunohost/data_migrations/0009_migrate_to_apps_json.py +++ b/src/yunohost/data_migrations/0009_migrate_to_apps_json.py @@ -1,5 +1,5 @@ from moulinette.utils.log import getActionLogger -from yunohost.app import app_fetchlist, app_removelist +from yunohost.app import app_fetchlist, app_removelist, _read_appslist_list from yunohost.tools import Migration logger = getActionLogger('yunohost.migration') @@ -10,12 +10,21 @@ class MyMigration(Migration): def migrate(self): - # Remove official.json list - app_removelist(name="yunohost") + # Remove all the deprecated lists + lists_to_remove = [ + "https://app.yunohost.org/official.json", + "https://app.yunohost.org/community.json", + "https://labriqueinter.net/apps/labriqueinternet.json" + ] + + appslists = _read_appslist_list() + for appslist, infos in appslists.items(): + if infos["url"] in lists_to_remove: + app_removelist(name=appslist) # Replace by apps.json list app_fetchlist(name="yunohost", - url="https://app.yunohost.org/apps.json") + url="https://app.yunohost.org/apps.json") def backward(self):