leapp-repository/0046-modify_userspace_for_livemode-Remove-unused-code-in-.patch
Petr Stodulka 66d3ee645d IPU 9.8 -> 10.2: CTC 1 candidate 1
- Requires leapp-framework 6.2+
- Modernize the storage initialization when booting to the upgrade environment
- Fix the upgrade on s390x LPAR when rootfs is on LVM
- Fix the detection of encrypted Ceph OSD containers
- Fix unlocking of LUKS devices when applied on non-rootfs file systems
- Detect potentially harmful third party python modules for the target python version
- Handle correctly live kernel patching during IPU
- Inhibit the upgrade if pluginpath is configured explicitly in DNF
- Introduce `--target-os` option to specify target distribution for possible conversion during the upgrade
- Introduce the `--target-version` alias for the `--target` option
- Minor changes in logs and reports
- Prevent sssdupdate actor from rising errors that could stop the upgrade
- Respect repomapping on CentOS-like distributions
- Respect repomapping when converting the system to different Linux distribution
- Skip empty lines when parsing dumped DNF config to prevent confusing warning log
- Update the leapp data files
- Update test plans
- Resolves: RHEL-76159, RHEL-95983, RHEL-108025, RHEL-108992, RHEL-110563, RHEL-119546
2025-11-13 16:34:58 +01:00

62 lines
2.6 KiB
Diff

From 4bede4b415f3e561399bf5c4ebed659c1aa4948d Mon Sep 17 00:00:00 2001
From: Matej Matuska <mmatuska@redhat.com>
Date: Thu, 21 Aug 2025 14:37:41 +0200
Subject: [PATCH 46/69] modify_userspace_for_livemode: Remove unused code in
modify_userspace_for_livemode
---
.../libraries/prepareliveimage.py | 30 +------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
index 116c463d..2587bf89 100644
--- a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
+++ b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
@@ -6,7 +6,7 @@ import os.path
from leapp.exceptions import StopActorExecutionError
from leapp.libraries.common import mounting
from leapp.libraries.common.config.version import get_target_major_version
-from leapp.libraries.stdlib import api, CalledProcessError
+from leapp.libraries.stdlib import api
from leapp.models import LiveImagePreparationInfo
LEAPP_UPGRADE_SERVICE_FILE = 'upgrade.service'
@@ -381,34 +381,6 @@ def setup_sshd(context, authorized_keys):
error
)
-# stolen from upgradeinitramfsgenerator.py
-def _get_target_kernel_version(context):
- """
- Get the version of the most recent kernel version within the container.
- """
- try:
- results = context.call(['rpm', '-qa', 'kernel-core'], split=True)['stdout']
-
- except CalledProcessError as error:
- problem = 'Could not query the target userspace kernel version through rpm. Full error: {0}'.format(error)
- raise StopActorExecutionError(
- 'Cannot get the version of the installed kernel.',
- details={'Problem': problem})
-
- if len(results) > 1:
- raise StopActorExecutionError(
- 'Cannot detect the version of the target userspace kernel.',
- details={'Problem': 'Detected unexpectedly multiple kernels inside target userspace container.'})
- if not results:
- raise StopActorExecutionError(
- 'Cannot detect the version of the target userspace kernel.',
- details={'Problem': 'An rpm query for the available kernels did not produce any results.'})
-
- kernel_version = '-'.join(results[0].rsplit("-", 2)[-2:])
- api.current_logger().debug('Detected kernel version inside container: {}.'.format(kernel_version))
-
- return kernel_version
-
def fakerootfs():
"""
--
2.51.1