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

[Request] Separate the package management part from core.py, use an independent installer and the correct location (/usr/local/bin) #449

Closed
YHNdnzj opened this issue Oct 31, 2022 · 5 comments

Comments

@YHNdnzj
Copy link

YHNdnzj commented Oct 31, 2022

According to file-hierarchy(7), /usr (except for /usr/local) should contain Vendor-supplied operating system resources i.e. shall be managed by the package manager and the package manager only. Runtime-generated files like cpufreqctl.auto-cpufreq should be installed to /usr/local/bin.

https://github.com/AdnanHodzic/auto-cpufreq/blob/master/auto_cpufreq/core.py#L309

@AdnanHodzic
Copy link
Owner

Since I'm very limited with available time to do this myself, if you or anyone else wants to give it a try in implementing this functionality, please give it a try and contribute to the project and you will be credited for your work as part of future release.

@AdnanHodzic AdnanHodzic changed the title Don't generate files in /usr/bin (cpufreqctl.auto-cpufreq) [Request] Don't generate files in /usr/bin (cpufreqctl.auto-cpufreq) Nov 11, 2022
@YHNdnzj
Copy link
Author

YHNdnzj commented Nov 11, 2022

Since I'm very limited with available time to do this myself, if you or anyone else wants to give it a try in implementing this functionality, please give it a try and contribute to the project and you will be credited for your work as part of future release.

After some investigation, I think the biggest problem is that a part of the installing/removing logic is in core.py, which makes little sense as those should mostly be handled by the package manager. I think the best approach is to make core.py only contain the real core functionalities. And files like cpufreqctl.auto-cpufreq can just be left to downstream packagers instead of being generated at runtime. If manual installation is required, an independent installation script could be used. But such change is huge and would take some time. If this is desired, I'd like to take part in as well :)

@YHNdnzj YHNdnzj changed the title [Request] Don't generate files in /usr/bin (cpufreqctl.auto-cpufreq) [Request] Separate the package management part from core.py, use an independent installer and the correct location (/usr/local/bin) Nov 11, 2022
@AdnanHodzic
Copy link
Owner

After some investigation, I think the biggest problem is that a part of the installing/removing logic is in core.py, which makes little sense as those should mostly be handled by the package manager. I think the best approach is to make core.py only contain the real core functionalities.

Agreed, this was my idea with core.py but then development went too fast with too little time to refactor things and here we are now :)

If this is desired, I'd like to take part in as well :)

@YHNdnzj sure sounds good, please give it a try :)

@gimbling-away
Copy link
Contributor

Auto-cpufreq now uses /usr/local/bin with my PR.

@AdnanHodzic
Copy link
Owner

Auto-cpufreq now uses /usr/local/bin with my PR.

Good point, I'll make sure to include this issue besides #460 for v1.9.7 release notes

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

3 participants