Bug 454765

Summary: Unable to save persistent module data if ~/.local/state folder does not exist
Product: [Developer tools] kdesrc-build Reporter: Paul Worrall <p.r.worrall>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED FIXED    
Severity: minor CC: nate, pa.sowa.dev
Priority: NOR Keywords: usability
Version First Reported In: Git   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Paul Worrall 2022-06-02 18:51:29 UTC
STEPS TO REPRODUCE
1. Install KDE Neon Developer Edition (directory ~/.local is created but contains no "state" directory)
2. Set up kdesrc-build as described in https://community.kde.org/Get_Involved/development
3. kdesrc-build dolphin

OBSERVED RESULT
Build runs but at the end there's a message: 

"Unable to save persistent module data! No such file or directory"

EXPECTED RESULT
kdesrc-build is able to save persistent module data, and gives no error message, or at least a message that states *which*  directory does not exist.
(Could kdesrc-build create the state directory if it doesn't already exist?)

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.13.0-44-generic (64-bit)
Graphics Platform: Wayland
Processors: 2 × AMD A6-6400K APU with Radeon(tm) HD Graphics
Memory: 7.7 GiB of RAM
Graphics Processor: AMD CEDAR
Manufacturer: NOVATECH LTD
Product Name: BB-64004H
System Version: V1.0

ADDITIONAL INFORMATION
Manually creating the state directory under ~/.local fixes the problem
Comment 1 P. Adam Sowa 2022-08-28 08:49:56 UTC
There is a MR that fixes this bug:
https://invent.kde.org/sdk/kdesrc-build/-/merge_requests/151
Comment 2 Nate Graham 2022-08-29 21:44:02 UTC
Git commit 2353ce1191eb1914bf7470452066282b08538ce8 by Nate Graham, on behalf of P. Adam Sowa.
Committed on 29/08/2022 at 21:43.
Pushed by ngraham into branch 'master'.

buildsystem: Fix for storePersistentOptions when ~/.local/state doesn't exist

kdesrc-build fails if `~/.local/state/` doesn't exist. This is very confusing,
especially for people that try to build KDE for the first time. This change
fixes that bug by creating the folder if it doesn't exist.

M  +9    -1    modules/ksb/BuildContext.pm

https://invent.kde.org/sdk/kdesrc-build/commit/2353ce1191eb1914bf7470452066282b08538ce8