Skips install step when there's "ninja: no work to do."
Recently (since 8c693eee to be precise) kdesrc-build started skipping the install step in some undesirable situations, requiring developers to resort to an expensive --refresh-build
option which takes much more time.
Situation 1: build plasma-wayland-protocols
from clean environment.
❯ kdesrc-build --include-dependencies plasma-wayland-protocols
Fetching remote changes to sysadmin-repo-metadata
Merging sysadmin-repo-metadata changes from branch master
Building extra-cmake-modules from frameworks (1/2)
Fetching remote changes to extra-cmake-modules
Merging extra-cmake-modules changes from branch master
Source update complete for extra-cmake-modules: 1 file affected.
Preparing build system for extra-cmake-modules.
Running cmake targeting Ninja...
Compiling... succeeded (after 3 seconds)
Installing.. succeeded (after 1 second)
Building plasma-wayland-protocols from kdesupport (2/2)
Fetching remote changes to plasma-wayland-protocols
Merging plasma-wayland-protocols changes from branch master
Source update complete for plasma-wayland-protocols: no files affected
Rebuilding because the build directory doesn't exist
Preparing build system for plasma-wayland-protocols.
Running cmake targeting Ninja...
Compiling... succeeded (after 0 seconds)
No changes from build, skipping install (--refresh-build this module to force install)
<<< PACKAGES SUCCESSFULLY BUILT >>>
extra-cmake-modules
plasma-wayland-protocols
:-)
Your logs are saved in file:///home/ratijas/kde/src/log/2022-08-24-01
Result: it did nothing. There were no work to do, so it didn't install the protocols which was the only thing required from this package. Passing --refresh-build
option fixes it, but the situation is absurd: there was nothing to refresh, build and install dirs were empty.
Situation 2: Work on QML interface. When working on QML stuff I often have to reinstall the package. Usually there's nothing new to build or compile — just the install part is needed. Unfortunately, kdesrc-build doesn't seem to provide an 'install only' execution mode (unlike most other package managers btw), so it's either a full rebuild for the sake of an e.g. little typo fix in qml file, or… is there even an alternative?