From e67402e018737729b8109255ff4642f8d3dd5a39 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 1 Aug 2026 22:01:38 +0300 Subject: [PATCH] build system + kde: fix stale-cache force-rebuild; bump plasma-wayland-protocols to 1.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause of kf6-kwayland's 'PlasmaWaylandProtocols >= 1.21.0 not found': the plasma-wayland-protocols recipe (a custom data-only recipe) HARD-CODED set(PACKAGE_VERSION "1.16.0") in the hand-written ConfigVersionCmake heredoc, while the package + source are 1.21.0. Bumped it to 1.21.0. Build-system fix (src/cook/cook_build.rs): the !check_source early-return served the cached stage for dependency cooks WITHOUT honoring --force-rebuild — it fired before the force_rebuild handling, so a stale binary-store artifact could never be regenerated. Guard it with !cook_config.force_rebuild so --force-rebuild always takes effect (repo binary rebuilt). kf6-kwayland: declare redbear-input-headers (fakeinput.cpp needs ). --- local/recipes/kde/kf6-kwayland/recipe.toml | 2 ++ local/recipes/kde/plasma-wayland-protocols/recipe.toml | 2 +- src/cook/cook_build.rs | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/local/recipes/kde/kf6-kwayland/recipe.toml b/local/recipes/kde/kf6-kwayland/recipe.toml index 895f865797..8b3662f79d 100644 --- a/local/recipes/kde/kf6-kwayland/recipe.toml +++ b/local/recipes/kde/kf6-kwayland/recipe.toml @@ -16,6 +16,8 @@ dependencies = [ "libwayland", "wayland-protocols", "plasma-wayland-protocols", + # for fakeinput.cpp (Linux input event codes). + "redbear-input-headers", ] script = """ DYNAMIC_INIT diff --git a/local/recipes/kde/plasma-wayland-protocols/recipe.toml b/local/recipes/kde/plasma-wayland-protocols/recipe.toml index f307df99fa..8d20455fae 100644 --- a/local/recipes/kde/plasma-wayland-protocols/recipe.toml +++ b/local/recipes/kde/plasma-wayland-protocols/recipe.toml @@ -38,7 +38,7 @@ cat > "${COOKBOOK_STAGE}/usr/lib/cmake/PlasmaWaylandProtocols/PlasmaWaylandProto set(PLASMA_WAYLAND_PROTOCOLS_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../share/plasma-wayland-protocols") EOF cat > "${COOKBOOK_STAGE}/usr/lib/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfigVersion.cmake" << 'EOF' -set(PACKAGE_VERSION "1.16.0") +set(PACKAGE_VERSION "1.21.0") if(PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() diff --git a/src/cook/cook_build.rs b/src/cook/cook_build.rs index ff97af773c..ccc235e0ec 100644 --- a/src/cook/cook_build.rs +++ b/src/cook/cook_build.rs @@ -496,7 +496,12 @@ pub fn build( }; } - if !check_source { + // Dependencies normally skip the source check for speed. But --force-rebuild + // must always take effect here — otherwise this early-return fires before the + // force_rebuild handling below, so a stale binary-store artifact whose source + // changed could never be regenerated (the KWayland/plasma-wayland-protocols + // 1.16-vs-1.21 stale-cache bug). + if !check_source && !cook_config.force_rebuild { // TODO: when stage_dirs does not exist due to clean_target was true, extract from stage.pkgar? let stage_present = stage_pkgars.iter().all(|file| file.is_file()); if stage_present && auto_deps_file.is_file() {