From c0155f58236eec159fade7e40f8f0465dd4e0b1f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 19 Feb 2019 08:35:06 +0100 Subject: [PATCH] inspect: detect Gentoo from os-release Add "gentoo" as recognized ID in /etc/os-release, and consider it as rolling distribution (so without VERSION_ID in os-release). This avoids using a not-useful version read from /etc/gentoo-release, e.g. "Gentoo Base System release 2.6". --- daemon/inspect_fs_unix.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml index cc6c9a29a..32eabf5d7 100644 --- a/daemon/inspect_fs_unix.ml +++ b/daemon/inspect_fs_unix.ml @@ -64,7 +64,7 @@ let arch_binaries = * features. *) let rolling_distros = - [ DISTRO_VOID_LINUX ] + [ DISTRO_GENTOO; DISTRO_VOID_LINUX ] (* Parse a os-release file. * @@ -144,6 +144,7 @@ and distro_of_os_release_id = function | "debian" -> Some DISTRO_DEBIAN | "fedora" -> Some DISTRO_FEDORA | "frugalware" -> Some DISTRO_FRUGALWARE + | "gentoo" -> Some DISTRO_GENTOO | "kali" -> Some DISTRO_KALI_LINUX | "mageia" -> Some DISTRO_MAGEIA | "neokylin" -> Some DISTRO_NEOKYLIN