Skip to content

Commit

Permalink
Check if repos existed before disable repos
Browse files Browse the repository at this point in the history
  • Loading branch information
hjluo committed May 20, 2024
1 parent 6803456 commit 2fc8fe4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/migration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ sub remove_dropped_modules_packages {
# https://documentation.suse.com/sles/15-SP2/html/SLES-all/cha-upgrade-online.html#sec-upgrade-online-zypper
sub disable_installation_repos {
if (is_s390x) {
zypper_call "mr -d `zypper lr -u | awk '/ftp:.*?openqa.suse.de|10.145.10.207|10.160.0.100/ {print \$1}'`";
my $repos = script_output("zypper lr -u | awk '/ftp:.*?openqa.suse.de|10.145.10.207|10.160.0.100/ {print \$1}'");
zypper_call "mr -d $repos" if (length $repos)
}
else {
zypper_call "mr -d -l";
Expand Down

0 comments on commit 2fc8fe4

Please sign in to comment.