From fbd828673de3d4eed525a982d75ace39a1f9eef1 Mon Sep 17 00:00:00 2001 From: Johanan Liebermann Date: Wed, 7 Sep 2022 20:14:12 +0300 Subject: Fix distro fact handling for Flatcar (#77635) * Fix distro fact handling for Flatcar The existence of the file /etc/flatcar/update.conf depends on bootstrap configuration typically provided by the user. For that reason this file is unsuitable for determining distro facts for Flatcar Container Linux. The distribution_release fact is meaningless in the case of Flatcar since Flatcar doesn't have named releases. The distribution_version fact, however, IS meaningful and should contain a number such as "3139.2.0". - Use /etc/os-release instead of /etc/flatcar/update.conf. - Drop the distribution_release fact. - Set the distribution_version fact. - Update distro test fixture for Flatcar - Generate the fixture using gen_distribution_version_testcase.py. - Override result.distribution and result.os_family manually as the generator script gives wrong values. - Use a recent Flatcar version. Signed-off-by: Johanan Liebermann --- hacking/tests/gen_distribution_version_testcase.py | 1 - 1 file changed, 1 deletion(-) (limited to 'hacking') diff --git a/hacking/tests/gen_distribution_version_testcase.py b/hacking/tests/gen_distribution_version_testcase.py index e520d121a4..2fc5a2f932 100755 --- a/hacking/tests/gen_distribution_version_testcase.py +++ b/hacking/tests/gen_distribution_version_testcase.py @@ -41,7 +41,6 @@ filelist = [ '/etc/altlinux-release', '/etc/os-release', '/etc/coreos/update.conf', - '/etc/flatcar/update.conf', '/usr/lib/os-release', ] -- cgit v1.2.1