diff --git a/snapcraft.yaml b/snapcraft.yaml index 8b1deb938..145b827b6 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -80,7 +80,7 @@ parts: source: https://git.launchpad.net/curtin source-type: git - source-commit: 40cae5c60fa9f4c495c7f61cde28862175f93ce2 + source-commit: "8aa0a9709d280f526c9a7cd62cffb53575a3a5e7" override-pull: | craftctl default @@ -229,7 +229,7 @@ parts: source: https://github.com/canonical/probert.git source-type: git - source-commit: 83d25c873a4a7d93c158d76da86cb9c612c29572 + source-commit: "83d25c873a4a7d93c158d76da86cb9c612c29572" override-build: *pyinstall diff --git a/subiquity/models/kernel.py b/subiquity/models/kernel.py index 55d111c0d..e0192024b 100644 --- a/subiquity/models/kernel.py +++ b/subiquity/models/kernel.py @@ -55,8 +55,8 @@ def needed_kernel(self) -> Optional[str]: # Newer ISOs may have the wrong kernel pre-installed, so we need to # install the correct kernel and remove the pre-installed one. We # continue to rely on curtin for kernel installation, with the addition - # of support to remove the pre-installed kernel. remove_existing does - # the right thing here. + # of support to remove the pre-installed kernel. `remove: existing` + # does the right thing here. # 3. yes preinstall, preinstalled kernel is right, no OEM kernel: # Almost identical to case #2 but this time the preinstall is correct. # This is the happy path and a noticeably faster install time. From the @@ -80,23 +80,23 @@ def needed_kernel(self) -> Optional[str]: # Handling: # 1. no preinstall, no OEM kernel: - # use "package" to specify the desired package, we set "remove_existing" - # but it has nothing to do, so nothing is removed. Curtin carries out - # the actual kernel install. - # config: {"package": "foo", "remove_existing": True} + # use "package" to specify the desired package, we set + # `remove: existing` but it has nothing to do, so nothing is removed. + # Curtin carries out the actual kernel install. + # config: {"package": "foo", "remove": "existing"} # 2. yes preinstall, preinstalled kernel is wrong, no OEM kernel: - # use "package" to specify the desired package, we set "remove_existing" - # and this time it has a pre-installed package to remove. Same config - # as #1, but curtin determines a package does need to be removed and - # does so. - # config: {"package": "foo", "remove_existing": True} + # use "package" to specify the desired package, we set + # `remove: existing` and this time it has a pre-installed package to + # remove. Same config as #1, but curtin determines a package does need + # to be removed and does so. + # config: {"package": "foo", "remove": "existing"} # 3. yes preinstall, preinstalled kernel is right, no OEM kernel: - # use "package" to specify the desired package, we set "remove_existing" - # like before. Same config as #1/#2, but curtin detects via - # ensure_one_kernel that the installed kernel state before/after - # installing the requested package is unchanged, so no kernel is - # removed. - # config: {"package": "foo", "remove_existing": True} + # use "package" to specify the desired package, we set + # `remove: existing` like before. Same config as #1/#2, but curtin + # detects via ensure_one_kernel that the installed kernel state + # before/after installing the requested package is unchanged, so no + # kernel is removed. + # config: {"package": "foo", "remove": "existing"} # 4. no preinstall, yes OEM kernel: # This time Subiquity is managing the kernel install, curtin should not # install anything, and curtin's ensure_one_kernel would do the right @@ -134,5 +134,5 @@ def render(self): if bool(self.remove): kernel["remove"] = self.remove else: - kernel["remove_existing"] = True + kernel["remove"] = "existing" return {"kernel": kernel} diff --git a/subiquity/models/tests/test_kernel.py b/subiquity/models/tests/test_kernel.py index 7b8308d6f..d2be003a0 100644 --- a/subiquity/models/tests/test_kernel.py +++ b/subiquity/models/tests/test_kernel.py @@ -27,7 +27,7 @@ def testInstall(self): expected = { "kernel": { "package": "kernel-a", - "remove_existing": True, + "remove": "existing", } } @@ -40,7 +40,7 @@ def testNoInstall(self): expected = { "kernel": { "install": False, - "remove_existing": True, + "remove": "existing", } }