On Tue, Jan 25, 2022 at 03:38:33PM +0100, Olaf Hering wrote:
Tue, 25 Jan 2022 14:17:23 +0100 Olaf Hering <olaf(a)aepfle.de>:
> Commit 4c69d64efa3731d074d198f871fd42e74c4a39f6 revealed the bug, /etc/os-release
must exist during build.
Now that a missing ^ID= became fatal, was it actually a good idea to be explicit?
I think poking around for clues in ^ID_LIKE= will be more robust, appending
'sles' would be not required.
You're right, /etc/os-release being absent should not result in a
build failure. And instead of matching on ID specifically, we could
probably use something like
grep -E '^ID(_LIKE)*=' /etc/os-release
instead and check only a subset of the strings we currently do. RHEL
and CentOS for example are both ID_LIKE=fedora. We'd have to be
careful about the order in which the Debian and Ubuntu branches
appear though.
--
Andrea Bolognani / Red Hat / Virtualization