Skip to content

Ensure platform-specific code is correctly namespaced #15

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

smortex
Copy link
Member

@smortex smortex commented Jun 16, 2025

Facts and providers are sometimes tied to a specific platform (e.g. Linux, FreeBSD, etc). When it is the case, they are placed in a directory named after this platform.

Some files are incorrectly stored in the base directory making it less obvious that they are platform-specific.

Originally submitted as:
puppetlabs/facter#2743

smortex added 3 commits June 16, 2025 07:56
Move all files that defines Facter::Resolvers::Linux::* into the
lib/facter/resolvers/linux directory.  Also only load them on Linux
systems as they are Linux-specific.
All other filesystems resolvers are named "filesystems" (plural), so
match the same name because all these resolvers have the same purpose.
FreeBSD has containers (jails) but already handled through the 'virutal'
resolver, so for now we just consider Linux being able to handle
containers as the code aleady depend on Linux-specific resolvers.
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

Successfully merging this pull request may close these issues.

2 participants