Breeze Icons cannot be built from read-only source location
ClosedPublic

Authored by marten on Apr 11 2020, 2:14 PM.

Details

Summary

In the situation, for example, where a master source tree may be shared among a number of build systems via NFS (each build system needs its own writeable build directory, of course). However, building the Breeze icons needs write access to the source tree for the SVG validation check, which is run in CMAKE_CURRENT_SOURCE_DIR:

[100%] Validating SVG
breezeicons/validate_svg.sh: line 3: xmlerrors: Read-only file system
rm: cannot remove 'xmlerrors': No such file or directory
make[2]: * [CMakeFiles/breeze-validate-svg.dir/build.make:58: CMakeFiles/breeze-validate-svg] Error 1
make[1]:
* [CMakeFiles/Makefile2:231: CMakeFiles/breeze-validate-svg.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

This change writes the temporary XML error file to CMAKE_CURRENT_BINARY_DIR, which can be relied on to be writeable.

Test Plan

Build Breeze Icons with this change, observed that the SVG validation check completes with no 'read-only file system' errors.

Diff Detail

Repository
R266 Breeze Icons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
marten created this revision.Apr 11 2020, 2:14 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 11 2020, 2:14 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
marten requested review of this revision.Apr 11 2020, 2:14 PM
pino added a subscriber: pino.Apr 11 2020, 2:18 PM

Or maybe the other way round:

  • add an optional parameter to the script to specify the source directory, defaulting to "."
  • run the script in the build directory, passing the source directory as parameter
marten updated this revision to Diff 79867.Apr 11 2020, 3:21 PM

Yes, that would mean fewer changes to the validate_svg.sh script.

ngraham accepted this revision.Apr 12 2020, 6:08 PM
ngraham added a subscriber: ngraham.

Nice improvement.

This revision is now accepted and ready to land.Apr 12 2020, 6:08 PM
This revision was automatically updated to reflect the committed changes.