Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract next statement from the function #9012

Merged
merged 1 commit into from Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/registration.pm
Expand Up @@ -369,14 +369,16 @@ sub _yast_scc_addons_handler {

sub skip_package_hub_if_necessary {
my ($addon) = @_;
my $skip_package_hub = 0;
if (is_sle('15-SP2+') && $addon eq 'phub') {
if (check_var('FLAVOR', 'Online')) {
record_soft_failure('bsc#1151373 - Missing or broken repository after registering module PackageHub');
} elsif (check_var('FLAVOR', 'Full')) {
record_info('Full media: no PHUB', 'Skipping Package Hub, it is not available on offline scenarios - bsc#1157659');
}
next;
$skip_package_hub = 1;
rwx788 marked this conversation as resolved.
Show resolved Hide resolved
}
return $skip_package_hub;
}

sub process_scc_register_addons {
Expand Down Expand Up @@ -420,7 +422,7 @@ sub process_scc_register_addons {
@scc_addons = grep { $_ ne '' } @scc_addons;

for my $addon (@scc_addons) {
skip_package_hub_if_necessary($addon);
next if (skip_package_hub_if_necessary($addon));
if (check_var('VIDEOMODE', 'text') || check_var('SCC_REGISTER', 'console')) {
# The actions of selecting scc addons have been changed on SP2 or later in textmode
# For online migration, we have to do registration on pre-created HDD, set a flag
Expand Down
4 changes: 2 additions & 2 deletions tests/installation/addon_products_sle.pm
Expand Up @@ -78,7 +78,7 @@ sub handle_all_packages_medium {
my @addons_with_license = qw(ha we);
my @addons_license_tags = ();
for my $i (@addons) {
skip_package_hub_if_necessary($i);
next if (skip_package_hub_if_necessary($i));
push @addons_license_tags, "addon-license-$i" if grep(/^$i$/, @addons_with_license);
send_key 'home';
send_key_until_needlematch "addon-products-all_packages-$i-highlighted", 'down', 30;
Expand Down Expand Up @@ -112,7 +112,7 @@ sub handle_all_packages_medium {
assert_screen "addon-products-nonempty";
# Confirm all required addons are properly added
foreach (@addons) {
skip_package_hub_if_necessary($_);
next if (skip_package_hub_if_necessary($_));
send_key 'home';
send_key_until_needlematch "addon-products-$_", 'down';
}
Expand Down