Files
RedBear-OS/local/scripts/tests
vasilito ffbbf4935c C-7 cleanup: lint-recipe down from 13 to 4 errors
The 4 remaining errors are out of C-7 scope:
  - sddm (19 seds): needs separate migration to
    `local/patches/sddm/` (already partly done via
    the drop-x11.py approach in the sddm 0.21.0 work)
  - qtbase (2 seds): needs separate migration
  - redbear-sessiond: missing patch file (pre-existing
    user WIP, not introduced by C-7)
  - libwayland: missing patch file (pre-existing user
    WIP, this is a re-add of the line C-1 removed)

Changes in this commit:

1. `local/scripts/lint-recipe.py`: R2-INLINE-SED rule now
   distinguishes upstream-source seds (target
   `${COOKBOOK_SOURCE}/` or `find "${COOKBOOK_SOURCE}``)
   from build-time seds (target `${COOKBOOK_STAGE}/`,
   `${COOKBOOK_BUILD}/`, `${COOKBOOK_SYSROOT}/`, or
   non-source paths). Build-time seds are exempt
   because they're adjustments to staged artifacts,
   not upstream source edits — the Rule 2 concern is
   upstream-source durability.

   This is a non-trivial refinement of the R2 rule
   because the original implementation flagged every
   `sed -i` regardless of target. Several recipes
   (bison, m4, rust-native, kf6-kded6, kf6-kbookmarks)
   had build-time seds mixed with upstream-source
   seds; the previous rule would force a migration
   for a build-time Makefile edit which doesn't
   actually fit the rule's intent.

2. `local/scripts/tests/test_lint_recipe.py`: updated
   the 2 R2 fixture tests to use the upstream-source
   path (`${COOKBOOK_SOURCE}/file.c`) so they actually
   trigger R2. Added 1 new test
   (`test_build_time_seds_are_exempt`) that verifies
   build-time seds targeting `${COOKBOOK_STAGE}`,
   `${COOKBOOK_BUILD}`, `${COOKBOOK_SYSROOT}` are
   correctly exempt. 25/25 lint tests pass.

3. `local/recipes/kde/breeze/recipe.toml`: deleted the
   lone `sed -i '/include(ECMQmlModule)/s/^/#/'` line.
   `ECMQmlModule` is not in upstream 6.6.5, so the sed
   was a no-op (dead code per the zero-tolerance
   policy on stubs and workarounds).

4. `local/recipes/kde/kde-cli-tools/recipe.toml`: deleted
   the `sed -i 's/^add_subdirectory(kdesu/#...'` line.
   The regex is BROKEN — it has `^add_subdirectory(kdesu/`
   but the upstream line is `    add_subdirectory(kdesu)`
   (with a `)`, not `/`). The sed was a no-op.
   The kdesu subdir has been building all along.

5. `local/recipes/kde/kf6-kbookmarks/recipe.toml`: deleted
   the 2 ecm/ki18n seds (NO-OPs — line not in upstream
   6.26.0) and the broken `find_package(Qt6GuiPrivate)`
   injection (regex typo: `Widgets)` requires a closing
   paren but upstream has `Widgets Xml)`). Remaining
   2 seds target `${COOKBOOK_SYSROOT}` (build-time,
   exempt per the new R2 rule).

6. `local/scripts/cleanup-kf6-noop-seds-targeted.sh`:
   added `kf6-kbookmarks` to the recipe list. It was
   missed in the original 24-recipe cleanup (the
   initial list was derived from the NO-OP classifier
   but kf6-kbookmarks' 2 sysroot seds made the
   classifier put it in the 'has-sysroot' bucket).
   Now caught by the targeted cleanup.
2026-06-12 22:52:13 +03:00
..