b4aed63dad
- Enable new upgrade path RHEL 8.10 -> 9.5 - Minor updates in reports - Add information about leapp invocation to leapp.db - Resolves: RHEL-27847
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From ae387bc31826e76c220f0b5fdd1f8fab4b36a5a3 Mon Sep 17 00:00:00 2001
|
|
From: David Kubek <dkubek@redhat.com>
|
|
Date: Tue, 21 Nov 2023 13:54:41 +0100
|
|
Subject: [PATCH 45/49] Add environment information to leappdb
|
|
|
|
Related to changes extending the information stored in the leapp db.
|
|
After this comment, the command line arguments as well as the
|
|
environment variables modifying the leapp execution (env vars starting
|
|
with `LEAPP_`) will be stored in the database.
|
|
|
|
Works on: OAMG-8402
|
|
---
|
|
commands/upgrade/util.py | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
|
index 9eff0ad1..b20c316d 100644
|
|
--- a/commands/upgrade/util.py
|
|
+++ b/commands/upgrade/util.py
|
|
@@ -3,6 +3,7 @@ import itertools
|
|
import json
|
|
import os
|
|
import shutil
|
|
+import sys
|
|
import tarfile
|
|
from datetime import datetime
|
|
|
|
@@ -235,6 +236,8 @@ def prepare_configuration(args):
|
|
'debug': os.getenv('LEAPP_DEBUG', '0'),
|
|
'verbose': os.getenv('LEAPP_VERBOSE', '0'),
|
|
'whitelist_experimental': args.whitelist_experimental or (),
|
|
+ 'environment': {env: os.getenv(env) for env in os.environ if env.startswith('LEAPP_')},
|
|
+ 'cmd': sys.argv,
|
|
}
|
|
return configuration
|
|
|
|
--
|
|
2.44.0
|
|
|