In case os-release does not contain VERSION_ID, and it is not an
exception (like Void Linux), then discard the results got from
os-release.
This matches what the old C code did -- e.g. see
commit 32d19e3289bc259901f77398703f16cf6eabd510, and the changes in
commit 0251c0fcaa4fbb3b42968792996748136700c8d8.
---
daemon/inspect_fs_unix.ml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml
index ba947c30e..8c7b1d83c 100644
--- a/daemon/inspect_fs_unix.ml
+++ b/daemon/inspect_fs_unix.ml
@@ -111,6 +111,10 @@ let rec parse_os_release release_file data =
data.version <- Some (0, 0);
true
+ (* No version detected, so fall back to other ways. *)
+ | { version = None } ->
+ false
+
| _ -> true
)
--
2.13.6