forked from rpms/leapp-repository
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
|
From dfd1093e9bde660a33e1705143589ec79e9970b1 Mon Sep 17 00:00:00 2001
|
||
|
From: Petr Stodulka <pstodulk@redhat.com>
|
||
|
Date: Mon, 10 Jul 2023 15:47:19 +0200
|
||
|
Subject: [PATCH 38/42] overlay lib: replace os.getenv common.config.get_env
|
||
|
|
||
|
All LEAPP_* envars are supposed to be read by library function
|
||
|
which ensures persistent behaviour during the whole upgrade process.
|
||
|
---
|
||
|
repos/system_upgrade/common/libraries/overlaygen.py | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/repos/system_upgrade/common/libraries/overlaygen.py b/repos/system_upgrade/common/libraries/overlaygen.py
|
||
|
index e0d88fe5..1e9c89f6 100644
|
||
|
--- a/repos/system_upgrade/common/libraries/overlaygen.py
|
||
|
+++ b/repos/system_upgrade/common/libraries/overlaygen.py
|
||
|
@@ -5,6 +5,7 @@ from collections import namedtuple
|
||
|
|
||
|
from leapp.exceptions import StopActorExecutionError
|
||
|
from leapp.libraries.common import mounting, utils
|
||
|
+from leapp.libraries.common.config import get_env
|
||
|
from leapp.libraries.stdlib import api, CalledProcessError, run
|
||
|
|
||
|
OVERLAY_DO_NOT_MOUNT = ('tmpfs', 'devpts', 'sysfs', 'proc', 'cramfs', 'sysv', 'vfat')
|
||
|
@@ -150,7 +151,7 @@ def _overlay_disk_size_old():
|
||
|
Convenient function to retrieve the overlay disk size
|
||
|
"""
|
||
|
try:
|
||
|
- env_size = os.getenv('LEAPP_OVL_SIZE', default='2048')
|
||
|
+ env_size = get_env('LEAPP_OVL_SIZE', '2048')
|
||
|
disk_size = int(env_size)
|
||
|
except ValueError:
|
||
|
disk_size = 2048
|
||
|
--
|
||
|
2.41.0
|
||
|
|