Skip to content

Commit

Permalink
Add kernel-default-devel for sle-micro
Browse files Browse the repository at this point in the history
  • Loading branch information
coolgw committed Oct 19, 2024
1 parent fe990ba commit 83094a5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,13 @@ sub zypper_install_available {
my $packlist = join(' ', @_);
my $result = zypper_search("-t package --match-exact $packlist");

return zypper_call('-t in ' . join(' ', map { $_->{name} } @$result));
if (is_transactional) {
transactional::trup_call("-c pkg install " . join(' ', map { $_->{name} } @$result));
#transactional::reboot_on_changes();
}
else {
return zypper_call('-t in ' . join(' ', map { $_->{name} } @$result));
}
}

=head2 set_zypper_lock_timeout
Expand Down
27 changes: 27 additions & 0 deletions tests/kernel/install_ltp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,17 @@ sub setup_network {
}
}

sub install_ltp_extra_dep_package {
if (is_transactional) {
if ((get_var('FLAVOR', '') =~ /Base-RT-Updates|Base-RT|Base-RT-encrypted/)) {
zypper_install_available("kernel-rt-devel");
}
else {
zypper_install_available("kernel-default-devel");
}
}
}

sub run {
my $self = shift;
my $inst_ltp = get_var 'INSTALL_LTP';
Expand Down Expand Up @@ -343,6 +354,9 @@ sub run {
# This is workaround for poo#165036 to prevent kernel-default and kernel-default-base installation
zypper_call("al kernel-default kernel-default-base") if (is_transactional && (get_var('FLAVOR', '') =~ /Base-RT-Updates|Base-RT|Base-RT-encrypted/));

# record_info('check0 dnsmasq after install kernel-devel');
# systemctl("reenable dnsmasq");

if ($inst_ltp =~ /git/i) {
install_build_dependencies;
install_runtime_dependencies;
Expand All @@ -363,6 +377,12 @@ sub run {
}
}

record_info('check1 dnsmasq after install kernel-devel');
# systemctl("reenable dnsmasq");
install_ltp_extra_dep_package();
record_info('check2 dnsmasq after install kernel-devel');
# systemctl("reenable dnsmasq");

log_versions 1;

zypper_call('in efivar') if is_sle('12+') || is_opensuse;
Expand All @@ -382,11 +402,18 @@ sub run {
add_grub_xen_replace_cmdline_settings("console=${serial_console},115200n", update_grub => 1);
}

record_info('check dnsmasq after install kernel-devel1');
# systemctl("reenable dnsmasq");

# Make sure latest installed packages ready before enable service in setup_network
if (is_transactional) {
reboot_on_changes;
}

record_info('check dnsmasq after install kernel-devel2');
# systemctl("status dnsmasq");
# systemctl("reenable dnsmasq");

setup_network;

# we don't run LVM tests in 32bit, thus not generating the runtest file
Expand Down

0 comments on commit 83094a5

Please sign in to comment.