Bug 454765 - Unable to save persistent module data if ~/.local/state folder does not exist
Summary: Unable to save persistent module data if ~/.local/state folder does not exist
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: Git
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-06-02 18:51 UTC by Paul Worrall
Modified: 2022-08-29 21:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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