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

Feature Request: OS Families #312

Open
martintc opened this issue May 29, 2022 · 1 comment
Open

Feature Request: OS Families #312

martintc opened this issue May 29, 2022 · 1 comment

Comments

@martintc
Copy link
Contributor

martintc commented May 29, 2022

I've done some work over on comtrya that uses this library and I was looking at how comtrya utilizes os_info and thought about how other programs may use os_info. Getting specific information is great, but in some cases, mostly in Linux, having the specific distro may be a little bit too much information for what is needed. As an example, Comtrya looks at all of the OS type to then decide what action to take. For some actions that may become unruly. So I am thinking, what if we add another parameter for a Generic "family." So you still get all of the detailed information but a generic label also. So for instance, all Linux distros would have a "Linux" family label. So a program that calls on information from os_info and doesnt care what distro it is can just compare against the family. It just needs to know it is linux, the calling code doesn't care if it is Gentoo or Debian or Fedora. An example would be comtrya with adding the ability for user management. Linux distros add users in pretty much the same fashion, but comtrya would have to have code for all possible variants of Type. I am also wondering if this would also allow code being ran on linux systems that don't have a specific Type definition in os_info to already be useful for calling code. In the case of a rust tool that handles user management, it could just compare against the family not against each individual type.

@stanislav-tkach
Copy link
Owner

Thank you for the suggestion, I think that makes sense. I will try to look into that, but feel free to submit a pull request if you like and/or want to speedup the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants