diff --git a/kano_updater/apt_wrapper.py b/kano_updater/apt_wrapper.py index 3056dcdd..00d3826c 100644 --- a/kano_updater/apt_wrapper.py +++ b/kano_updater/apt_wrapper.py @@ -83,6 +83,10 @@ def __init__(self): else: AptWrapper._singleton_instance = self + self._cache = None + self.refresh_instance() + + def refresh_instance(self): apt.apt_pkg.init_config() # We disable downloading translations, because we don't have them diff --git a/kano_updater/scenarios.py b/kano_updater/scenarios.py index 9315b0bd..db9f232d 100644 --- a/kano_updater/scenarios.py +++ b/kano_updater/scenarios.py @@ -1048,6 +1048,7 @@ def beta_3_15_0_to_beta_3_16_0(self, progress): # Proceeding to update to 4.x.x - add new sources and relaunch shutil.copy(REFERENCE_STRETCH_LIST, STRETCH_MIGRATION_LIST) apt_handle = AptWrapper.get_instance() + apt_handle.refresh_instance() apt_handle.update(progress) progress.relaunch()