diff --git a/doc/adoc/user_guide.adoc b/doc/adoc/user_guide.adoc index c0c690c..afe966e 100644 --- a/doc/adoc/user_guide.adoc +++ b/doc/adoc/user_guide.adoc @@ -3,13 +3,13 @@ [#art-suse-migration-services] = Using the SUSE Distribution Migration System -Marcus Schäfer; Jesús Velázquez; Keith Berger +Marcus Schäfer; Jesús Velázquez; Keith Berger; Robert Schweikert :toc: :icons: font :numbered: -:Authors: Marcus Schäfer, Jesús Bermúdez Velázquez, Keith Berger +:Authors: Marcus Schäfer, Jesús Bermúdez Velázquez, Keith Berger, Robert Schweikert :Latest_Version: 1.2.0 :Contributors: :Repo: https://github.com/SUSE/suse-migration-services[suse-migration-services] @@ -312,7 +312,8 @@ verbose_migration: true|false Enable the fix option for pre_checks:: If enabled (default), the run_pre_checks systemd process will use the `--fix` -option to automatically remediate applicable issues before the migration is started. +option to automatically remediate applicable issues before the migration +is started. + [listing] ---- @@ -332,6 +333,18 @@ independent initrd can be created by setting build_host_independent_initrd: true|false ---- +Configure Dependency Solver Test Case Generation:: +It is possible that during the migration packages get installed that were not +on the system previously and are pulled in because of dependencies. This +setting will setup the migration such that a solver test case is generated. +The information form the test case can then be used to understand why a +given package was installed. ++ +[listing] +---- +debug_solver: true|false +---- + == Run the Migration Migration can be triggered either via run_migration or via reboot. diff --git a/suse_migration_services/defaults.py b/suse_migration_services/defaults.py index e6d208b..2ace74d 100644 --- a/suse_migration_services/defaults.py +++ b/suse_migration_services/defaults.py @@ -125,3 +125,7 @@ def get_proxy_path(): @staticmethod def get_zypp_config_path(): return '/etc/zypp/zypp.conf' + + @staticmethod + def get_zypp_gen_solver_test_case(): + return '' diff --git a/suse_migration_services/migration_config.py b/suse_migration_services/migration_config.py index ed36565..ad09b59 100644 --- a/suse_migration_services/migration_config.py +++ b/suse_migration_services/migration_config.py @@ -148,6 +148,9 @@ def get_migration_config_file_content(self): def is_verbosity_requested(self): return self.config_data.get('verbose_migration', False) + def is_zypp_solver_test_case_requested(self): + return self.config_data.get('debug_solver', False) + def _write_config_file(self): with open(self.migration_config_file, 'w') as config: yaml.dump(self.config_data, config, default_flow_style=False) diff --git a/suse_migration_services/schema.py b/suse_migration_services/schema.py index ed33c04..87cbfa0 100644 --- a/suse_migration_services/schema.py +++ b/suse_migration_services/schema.py @@ -42,5 +42,9 @@ 'pre_checks_fix': { 'required': False, 'type': 'boolean' + }, + 'debug_solver': { + 'required': False, + 'type': 'boolean' } } diff --git a/suse_migration_services/units/migrate.py b/suse_migration_services/units/migrate.py index e2e564d..c36397e 100644 --- a/suse_migration_services/units/migrate.py +++ b/suse_migration_services/units/migrate.py @@ -59,12 +59,18 @@ def main(): log.info('Update env variables') update_env(migration_config.get_preserve_info()) log_env(log) - verbose_migration = '--verbose' if migration_config.is_verbosity_requested() else '--no-verbose' + verbose_migration = '--no-verbose' + if migration_config.is_verbosity_requested(): + verbose_migration = '--verbose' + solver_case = Defaults.get_zypp_gen_solver_test_case() + if migration_config.is_zypp_solver_test_case_requested(): + solver_case = '--debug-solver' if migration_config.is_zypper_migration_plugin_requested(): bash_command = ' '.join( [ 'zypper', 'migration', verbose_migration, + solver_case, '--non-interactive', '--gpg-auto-import-keys', '--no-selfupdate',