https://bugs.kde.org/show_bug.cgi?id=481098

            Bug ID: 481098
           Summary: For some distributions --initial-setup will not
                    properly set the amount of usable cores
    Classification: Developer tools
           Product: kdesrc-build
           Version: Git
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: setup wizard
          Assignee: mp...@kde.org
          Reporter: juer...@youkai.dev
  Target Milestone: ---

SUMMARY
***
On a high level kdesrc-build populates the two variables "num-cores" and
"num-cores-low-mem" inside the kdesrc-buildrc config file like so:
num-cores = Result of nproc
num-cores-low-mem = min(num-cores, Total ram in GiB / 2GiB )

It does so only if it detects that the current platform is linux or freebsd.
However, the platform detection logic is flawed on the linux side because it's
relying on the OS identification parameter "ID" from /etc/os-release and
testing if it's equal to "linux". On some (most?) distributions this is not the
case and the script will default to assigning the value 4 to num-cores and
num-cores-low-mem.
***

STEPS TO REPRODUCE
0. Temporarily backup and move/delete ~/.config/kdesrc-buildrc if it exists
1. Run through "./kdesrc-build --initial-setup" 

OBSERVED RESULT
The variables num-cores and num-cores-low-mem inside ~/.config/kdesrc-buildrc
will have the default value of 4 when running on a distribution which sets the
"ID" paramenter of /etc/os-release to something other than "linux".

EXPECTED RESULT
The variables should be set based on the amount of system memory. A 16-core
16GiB Ram System should have the following values: num-cores = 16;
num-cores-low-mem = 8.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 39
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
The relevant code starts here
https://invent.kde.org/sdk/kdesrc-build/-/blob/master/modules/ksb/FirstRun.pm?ref_type=heads#L299

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to