Skip to content

Commit

Permalink
Exclude saptune package when extra module name from repo url
Browse files Browse the repository at this point in the history
  • Loading branch information
badboywj committed Nov 13, 2024
1 parent 7039781 commit 9b17a5f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/qam-updinstall/update_install.pm
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,16 @@ sub run {
zypper_call(q{mr -f $(zypper lr | awk -F '|' '/SLES15-SP4-15.4-0/ {print $2}')}, exitcode => [0, 3]) if get_var('FLAVOR') =~ /TERADATA/;
zypper_call("ar -f http://dist.suse.de/ibs/SUSE/Updates/SLE-Live-Patching/12-SP3/" . get_var('ARCH') . "/update/ sle-module-live-patching:12-SP3::update") if is_sle('=12-SP3');

# Get packages affected by the incident.
my @packages = get_incident_packages($incident_id);
record_info('Packages', "@packages");

# Extract module name from repo url.
my @modules = split(/,/, $repos);
foreach (@modules) {
# substitue SLES_SAP for LTSS repo at this point is SAP ESPOS
$_ =~ s/SAP_(\d+(-SP\d)?)/$1-LTSS/ if is_sle('15+');
$_ =~ s/SAP_(\d+(-SP\d)?)/SERVER_$1-LTSS/ if is_sle('=12-sp5');
$_ =~ s/SAP_(\d+(-SP\d)?)/SERVER_$1-LTSS/ if is_sle('=12-sp5') and !grep(/saptune/,@packages);
next if s{http.*SUSE_Updates_(.*)/?}{$1};
die 'Modules regex failed. Modules could not be extracted from repos variable.';
}
Expand All @@ -222,10 +226,6 @@ sub run {
my @patches = get_patch($incident_id, $repos);
record_info "Patches", "@patches";

# Get packages affected by the incident.
my @packages = get_incident_packages($incident_id);
record_info('Packages', "@packages");

# Get binaries that are in each package across the modules that are in the repos.
foreach (@packages) {
%bins = (%bins, get_packagebins_in_modules({package_name => $_, modules => \@modules}));
Expand Down

0 comments on commit 9b17a5f

Please sign in to comment.