mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-25 14:41:27 +00:00
Fix Silveblue Beta Values
This commit is contained in:
parent
5aa9ca1cf3
commit
519e6a8d20
@ -34,10 +34,15 @@ sub run {
|
||||
# correct variables to compare the system data with.
|
||||
# First, we know the basic stuff
|
||||
my $id = get_var("DISTRI"); # Should be "fedora"
|
||||
my $silvertag = get_var("BUILD"); # Takes the build string for Silverblue variants.
|
||||
# Cut the "Fedora-XX-" part of the build number and leave the XXXXXXXX.n.X part.
|
||||
$silvertag =~ s/\D+\d\d-//g;
|
||||
|
||||
my $isovar = get_var("ISO"); # Takes the build string for Silverblue variants.
|
||||
# Split the ISO variable at "-" and read fields 4 (release version)
|
||||
# and 5 (the build number).
|
||||
my ($sbver, $sbnum) = (split /-/, $isovar)[4, 5];
|
||||
# Get rid of the ".iso" part of the tag.
|
||||
$sbnum =~ s/\.iso//g;
|
||||
# Now, we merge the fields into one expression to create the correct Silverblue tag
|
||||
# that will contain both the version number and the build number.
|
||||
my $silvertag = "$sbver.$sbnum";
|
||||
my $name = ucfirst($id);
|
||||
my $version_id = get_var("VERSION"); # Should be the version number or Rawhide.
|
||||
my $varstr = spell_version_number($version_id);
|
||||
@ -72,15 +77,15 @@ sub run {
|
||||
|
||||
my $version = "$version_id ($varstr)";
|
||||
# Version looks differently when the build is a Silverblue. We need to form
|
||||
# a different string here, including the silverblue tag.
|
||||
# a different string here by using the above createad silvertag.
|
||||
if ($subvariant eq "Silverblue") {
|
||||
$version = "$version_id.$silvertag ($varstr)";
|
||||
$version = "$silvertag ($varstr)";
|
||||
}
|
||||
my $platform_id = "platform:f$version_id";
|
||||
my $pretty = "$name $version_id ($varstr)";
|
||||
# Same problem is when testing the PRETTY_NAME.
|
||||
if ($subvariant eq "Silverblue") {
|
||||
$pretty = "$name $version_id.$silvertag ($varstr)";
|
||||
$pretty = "$name $silvertag ($varstr)";
|
||||
}
|
||||
|
||||
#Now. we can start testing the real values from the installed system.
|
||||
|
Loading…
Reference in New Issue
Block a user