Skip to content

Commit

Permalink
Merge pull request os-autoinst#20424 from m-dati/cont_hst_slm61_newca
Browse files Browse the repository at this point in the history
Get default CA when missing in IBS
  • Loading branch information
asmorodskyi authored Oct 18, 2024
2 parents bc6ff4d + a13f7b8 commit fe990ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2373,8 +2373,11 @@ sub ensure_ca_certificates_suse_installed {
return unless is_sle || is_sle_micro;
if (script_run('rpm -qi ca-certificates-suse') == 1) {
my $host_version = get_var("HOST_VERSION") ? 'HOST_VERSION' : 'VERSION';
my $distversion = get_required_var($host_version) =~ s/-SP/_SP/r; # 15 -> 15, 15-SP1 -> 15_SP1
zypper_call("ar --refresh http://download.suse.de/ibs/SUSE:/CA/SLE_$distversion/SUSE:CA.repo");
my $distversion = 'SLE_' . get_required_var($host_version) =~ s/-SP/_SP/r; # 15 -> 15, 15-SP1 -> 15_SP1
my $exit = script_run("curl -fkIL http://download.suse.de/ibs/SUSE:/CA/$distversion/SUSE:CA.repo >/dev/null 2>&1");
$distversion = 'SLE-Factory' if ($exit != 0);
diag "CA folder: $distversion";
zypper_call("ar --refresh http://download.suse.de/ibs/SUSE:/CA/$distversion/SUSE:CA.repo");
if (is_sle_micro) {
transactional::trup_call('--continue pkg install ca-certificates-suse');
} else {
Expand Down

0 comments on commit fe990ba

Please sign in to comment.