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

Drop _emerge/getloadavg.py #1383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Flowdalic
Copy link
Member

@Flowdalic Flowdalic commented Sep 21, 2024

CC @zmedico You added the getloadavg() wrapper to portage with 8607a39dc9d9. However, the commit message lacks a rationale why such a wrapper became necessary. This PR assumes that the reasons for the wrapper are now no longer existent. Could you please clarify if this is true? Otherwise we should consider adding a code comment to _emerge/getloadavg.py explaining the reason for the wrapper.

Portage's custom getloadavg.py wrapper was added with
8607a39 ("If necessary, use /proc/loadavg to emulate
os.getloadavg()."). All platforms we care about provide
os.getloadavg() now, so this can be dropped.

Signed-off-by: Florian Schmaus <[email protected]>
@zmedico
Copy link
Member

zmedico commented Sep 26, 2024 via email

@grobian
Copy link
Member

grobian commented Sep 27, 2024

Hi @zmedico os.getloadavg() returns data everywhere I tried. Should it be unavailable, I think we should just ignore it, and disable or bark or something when load average limits are used. It's not like loadaverage means the same on every platform anyway.

As for keeping it in Prefix: I'd say not. /proc is only available on Linux this way AFAICT, so it's hardly useful on other platforms.

@chewi
Copy link
Member

chewi commented Sep 27, 2024

Sounds good to me, although I don't do much with alternative libcs.

@Flowdalic Flowdalic changed the title RFC: Drop _emerge/getloadavg.py Drop _emerge/getloadavg.py Sep 27, 2024
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.

4 participants