Handle case when .xsession file is not present
After the build is completed, kde-builder tries to modify .xsession file but fails to do so as it is not present on my system. It should check if the file exists or not.
Encountered an error in the execution of the script.
--> [Errno 13] Permission denied: '/home/provost/.xsession'
Please submit a bug against kdesrc-build on https://bugs.kde.org/
Traceback (most recent call last):
File "/home/provost/kde/src/kde-builder/kde-builder", line 58, in <module>
result = app.runAllModulePhases()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/provost/kde/src/kde-builder/ksblib/Application.py", line 636, in runAllModulePhases
Application._installCustomSessionDriver(ctx)
File "/home/provost/kde/src/kde-builder/ksblib/Application.py", line 1679, in _installCustomSessionDriver
Application._installCustomFile(ctx, sessionScript, f"""{os.environ.get("HOME")}/.xsession""", "xsession-digest")
File "/home/provost/kde/src/kde-builder/ksblib/Application.py", line 1619, in _installCustomFile
if hashlib.md5(open(destFilePath, "rb").read()).hexdigest() != existingMD5:
^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/provost/.xsession'
Edited by Andrew Shark