Skip to content

Commit ed20be5

Browse files
fix(scripts): skip zen patch when tree is same major.minor series
XanMod always tracks stable, so the Liquorix zen patch (a stable backport, e.g. v6.18.16-lqx1.patch) will always conflict with an XanMod tree at the same series (e.g. 6.18.19). Match on major.minor rather than exact version.
1 parent 6d8042d commit ed20be5

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

scripts/apply-patches.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,19 @@ apply_series() {
6666
fi
6767

6868
# If the patch filename encodes a stable-point-release version
69-
# (e.g. v6.19.10-lqx2.patch) that the tree already satisfies,
70-
# skip it unconditionally — applying it would produce mass rejects.
69+
# (e.g. v6.18.16-lqx1.patch), check whether the tree is already at
70+
# the same major.minor series. XanMod always tracks stable, so the
71+
# Liquorix zen patch (which backports stable commits) will always
72+
# conflict — skip it when the series matches.
7173
local patch_name
7274
patch_name=$(basename "${patch_path}")
73-
if [[ "${patch_name}" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)- ]]; then
74-
local patch_kver="${BASH_REMATCH[1]}"
75-
local tree_kver
76-
tree_kver=$(make -s -C "${KERNEL_SRC}" kernelversion 2>/dev/null \
77-
| grep -oE '^[0-9]+\.[0-9]+\.[0-9]+' || true)
78-
if [[ -n "${tree_kver}" && "${patch_kver}" == "${tree_kver}" ]]; then
79-
log WARN "patch targets ${patch_kver} which matches tree version — skipping: ${line}"
75+
if [[ "${patch_name}" =~ ^v([0-9]+\.[0-9]+)\.[0-9]+-lqx ]]; then
76+
local patch_series="${BASH_REMATCH[1]}"
77+
local tree_series
78+
tree_series=$(make -s -C "${KERNEL_SRC}" kernelversion 2>/dev/null \
79+
| grep -oE '^[0-9]+\.[0-9]+' || true)
80+
if [[ -n "${tree_series}" && "${patch_series}" == "${tree_series}" ]]; then
81+
log WARN "zen stable-backport patch for ${patch_series} already in XanMod tree — skipping: ${line}"
8082
(( skipped++ )) || true
8183
continue
8284
fi

0 commit comments

Comments
 (0)