On Thu, Jan 27, 2022 at 11:05:49AM +0100, Pavel Hrdina wrote:
On Wed, Jan 26, 2022 at 04:13:13PM +0100, Andrea Bolognani wrote:
> + elif (os_release.contains('fedora') or
> os_release.contains('gentoo') or
> os_release.contains('suse'))
I would add comments here, for example:
# Check for Fedora like OSes which includes CentOS, RHEL and similar.
And the same for SUSE and SLES.
Yeah, good idea.
In general I like this idea and at the same time I don't like it
at all
:D. It will catch more OSes based on fedora/ubuntu/suse but at the same
time it might cause issues in the future if something changes.
I think it's an improvement because it avoids the need to keep track
of every single distribution, which is exactly what the ID_LIKE field
is supposed to help with.
As an example, Rocky Linux is a RHEL rebuild which has
ID_LIKE=fedora, and so after this change it gets good defaults
instead of the root:root fallback.
If we later find out that some derivative uses different defaults
than the distro it's based on we can always special-case it, like
we're doing with Ubuntu today.
I've posted a v2 which adds comments.
--
Andrea Bolognani / Red Hat / Virtualization