1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-24 23:03:08 +00:00

os_release: adjust for Fedora CoreOS

...which just has to be another special flower.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-09-02 16:22:20 -07:00
parent 478b7eff9e
commit e99a3fbdf9

View File

@ -52,6 +52,12 @@ sub run {
# Now, we merge the fields into one expression to create the correct canned tag
# that will contain both the version number and the build number.
my $cannedtag = "$cannedver.$cannednum";
# If this is a CoreOS build, though, throw all that away and
# just use the build version
my $build = get_var("BUILD");
if ($build =~ /^Fedora-CoreOS/) {
$cannedtag = (split /-/, $build)[-1];
}
my $name = ucfirst($id);
my $rawrel = get_var("RAWREL", '');
my $version_id = get_var("VERSION"); # Should be the version number or Rawhide.
@ -113,6 +119,10 @@ sub run {
# Same problem is when testing the PRETTY_NAME.
if (get_var("CANNED")) {
$pretty = "$name $cannedtag ($varstr)";
# ...and FCOS uses a different format, sigh
if ($build =~ /^Fedora-CoreOS/) {
$pretty = "Fedora CoreOS $cannedtag";
}
}
#Now. we can start testing the real values from the installed system.