Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fall back to ID if ID_LIKE is not available #494

Open
mmuffins opened this issue Aug 17, 2024 · 3 comments
Open

Fall back to ID if ID_LIKE is not available #494

mmuffins opened this issue Aug 17, 2024 · 3 comments

Comments

@mmuffins
Copy link

mmuffins commented Aug 17, 2024

Is your feature request related to a problem? Please describe.

I recently got started with yadm and spent a good while trying to figure out why alternative files wouldn't be created for selector ##distro_family.debian when using it on a vanilla debian system.

Describe the solution you'd like

Could it be an option to consider the base ID field if ID_LIKE is not available in /etc/os-release? Base distros like debian or arch sitting at the root of the distro tree may deliberately omit the field. The specification is not explicit on what to do if the current distro isn't a derivative of something else, but it says to only list distros you derive from, so base distros seem to correctly not set this field.

A space-separated list of operating system identifiers in the same syntax as the ID= setting. It should list identifiers of operating systems that are closely related to the local operating system in regards to packaging and programming interfaces, for example listing one or more OS identifiers the local OS is a derivative from. An OS should generally only list other OS identifiers it itself is a derivative of, and not any OSes that are derived from it, though symmetric relationships are possible. Build scripts and similar should check this variable if they need to identify the local operating system and the value of ID= is not recognized. Operating systems should be listed in order of how closely the local operating system relates to the listed ones, starting with the closest. This field is optional.

from https://www.freedesktop.org/software/systemd/man/latest/os-release.html

Describe alternatives you've considered

I can see that there are options being considered, e.g by overriding the distro_family, which is definitely a valid option for distros that just don't set the value, but I'm not sure if it's the best approach for all use cases.

Copy link

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 17, 2024
Copy link

This issue was closed because it has been labeled as stale for 7 days with no activity.

@erijo
Copy link
Collaborator

erijo commented Dec 15, 2024

Fixed in 6c1970f on develop.

@erijo erijo reopened this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants