From 7ff49625cda0f899b9f8ed26988b3f5eeeaf4284 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Wed, 9 Nov 2022 04:28:10 +0000 Subject: [PATCH] Not needed anymore --- shpc/main/modules/base.py | 50 --------------------------------------- 1 file changed, 50 deletions(-) diff --git a/shpc/main/modules/base.py b/shpc/main/modules/base.py index 817de3e78..a468799a8 100644 --- a/shpc/main/modules/base.py +++ b/shpc/main/modules/base.py @@ -516,53 +516,3 @@ def _reinstall(self, module_name, version, when_missing): "%s is not in the Registry any more. Add --uninstall-missing or --ignore-missing." % missing ) - - def _upgrade(self, module_name, versions, upgrade=False, force=False): - result = self.registry.find(module_name) - if result: - - valid_tags = container.ContainerConfig(result).tags - if upgrade: - - views_with_module = set() - for version in versions: - module_dir = os.path.join( - self.settings.module_base, module_name, version - ) - for view_name, entry in self.views.items(): - if entry.exists(module_dir): - views_with_module.add(view_name) - - self.install(module_name, allow_reinstall=True) - for view in views_with_module: - self.views[view].install(module_dir) - - for version in versions: - if version != valid_tags.latest.name: - self.uninstall(module_name + ":" + version, force=True) - - else: - for version in versions: - if version in valid_tags: - module_dir = os.path.join( - self.settings.module_base, module_name, version - ) - these_views = [] - # TODO: switch to .values() - for view_name, entry in self.views.items(): - if entry.exists(module_dir): - these_views.append(entry) - self.install(module_name + ":" + version, allow_reinstall=True) - for view in these_views: - view.install(module_dir) - - else: - logger.warning( - "%s:%s is not available anymore and will be skipped" - % (module_name, version) - ) - - else: - logger.warning( - "%s is not available anymore and will be skipped" % module_name - )