963c2baba5
For each recipe with a migration patch in
`local/patches/<name>/`, replace the inline
`sed -i` chains in the recipe's [build].script
with a single `cookbook_apply_patches${REDBEAR_PATCHES_DIR}`
call.
The cookbook's helper applies every patch in
`local/patches/<name>/[0-9]*.patch` in lexical
order, with idempotency (skips patches that are
already applied via `git apply --reverse --check`).
The recipe no longer needs to inline the sed chains
— they're durable in the patch.
Path resolution: ${COOKBOOK_RECIPE}/../../../../local/patches/<name>`
That's 4 levels up because the KF6 recipes live at
`local/recipes/kde/<name>/` (4 levels deep from
the project root). The cookbook helper's docstring
shows `../../../` (3 levels) which is for the
older recipe layout at `recipes/<cat>/<name>/`.
The `local/recipes/libs/libdrm/recipe.toml` and
`local/recipes/kde/sddm/recipe.toml` already used
the 4-level path. KF6 recipes are now consistent
with those.
New helper: `local/scripts/edit-kf6-recipes-for-patches.sh`
Removes every `sed -i` chain from a recipe and
inserts the `cookbook_apply_patches` call in place
of the FIRST removed sed. Works for any recipe with
a migration patch, regardless of how many chains
it had (1 for kf6-kauth, 10 for kf6-kcmutils and
kf6-knotifications, 8 for kf6-kjobwidgets, etc.).
Recipes edited (24):
kdecoration, kf6-karchive, kf6-kauth, kf6-kcmutils,
kf6-kcodecs, kf6-kcompletion, kf6-kconfig,
kf6-kcoreaddons, kf6-kdbusaddons, kf6-kdeclarative,
kf6-kglobalaccel, kf6-kitemviews, kf6-kjobwidgets,
kf6-knotifications, kf6-kwayland, kf6-kwidgetsaddons,
kf6-kwindowsystem, kf6-notifyconfig, kf6-solid,
kf6-sonnet, kf6-syntaxhighlighting, kirigami,
konsole, kwin
Skipped (7): breeze, kde-cli-tools, kf6-kbookmarks,
kf6-kded6, kglobalacceld, plasma-desktop,
plasma-workspace — no migration patch (NO-OP
recipes whose sed chains were already cleaned).
The cookbook's idempotency means a partial re-cook
(after a previous successful cook) doesn't fail
with 'patch already applied' — the helper just
prints 'applying=N skipped=1'.