When setting the PORTAGE_SCHEDULING_POLICY="idle" variable in make.conf, attempting to run emerge --info (or any other emerge command) results in an error. Specifically, the following traceback is thrown: ``` # emerge --info Traceback (most recent call last): File "/usr/lib/python-exec/python3.10/emerge", line 58, in <module> retval = emerge_main() File "/usr/lib/python3.10/site-packages/_emerge/main.py", line 1294, in emerge_main return run_action(emerge_config) File "/usr/lib/python3.10/site-packages/_emerge/actions.py", line 3527, in run_action apply_priorities(emerge_config.target_config.settings) File "/usr/lib/python3.10/site-packages/_emerge/actions.py", line 3073, in apply_priorities set_scheduling_policy(settings) File "/usr/lib/python3.10/site-packages/_emerge/actions.py", line 3154, in set_scheduling_policy os.sched_setscheduler(portage.getpid(), policy, os.sched_param(scheduling_priority)) File "/usr/lib/python3.10/site-packages/portage/__init__.py", line 281, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) OSError: [Errno 38] Function not implemented ``` This error appears to indicate that the sched_setscheduler function is not implemented, likely due to some issue with the PORTAGE_SCHEDULING_POLICY setting. # TECHNICAL INFORMATION # Steps to reproduce: Set PORTAGE_SCHEDULING_POLICY="idle" in make.conf. Run emerge --info command. # Expected behavior: emerge --info should run successfully with the PORTAGE_SCHEDULING_POLICY="idle" setting in make.conf. # Actual behavior: The command fails with an OSError: [Errno 38] Function not implemented. # Workaround: Unset the PORTAGE_SCHEDULING_POLICY="idle" setting in make.conf. # Additional information: Gentoo Hardened Musl Thank you for your attention to this issue.
*** Bug 904501 has been marked as a duplicate of this bug. ***
Unfortunately, it looks like musl genuinely doesn't support this (see https://patchwork.ozlabs.org/project/buildroot/patch/c9b7162513ee169da4b9e7e73d66288c083e4a7a.camel@gmail.com/), so we just need to give a nicer error message (or silently ignore it, not sure) in Portage.