From 0c2b4b3dafad55d599acdb54553a985280ce0e23 Mon Sep 17 00:00:00 2001 From: Michal Koutný Date: Sep 21 2022 14:21:43 +0000 Subject: scripts/CKC: Modify check-kernel-commit to parse branches.conf Thus we can use the same source of truth. --- diff --git a/scripts/check-kernel-commit b/scripts/check-kernel-commit index 533402c..6a612cd 100755 --- a/scripts/check-kernel-commit +++ b/scripts/check-kernel-commit @@ -105,18 +105,26 @@ print_branch() done } +grep -w build "$branches" | grep -v -E "^(master|vanilla|linux-next|cve)" | \ while read line ; do line=${line%%\#*} - branch=${line%% *} - parents=${line#$branch} - # always check also the _EMBARGO branch as a possible parent - parents="${branch}_EMBARGO $parents" + branch=${line%%:*} # empty line or comment if [ -z "$branch" ] ; then continue fi + # always check also the _EMBARGO branch as a possible parent + parents="${branch}_EMBARGO" + set dummy ${line#$branch:} + while [ $# -gt 0 ] ; do + shift + [[ "$1" =~ "merge:" ]] || continue + tmp="${1//*merge:-/}" + parents="$parents ${tmp//*merge:/}" + done + print_branch "$branch" check_branch "$branch" @@ -134,4 +142,4 @@ while read line ; do echo -n "" check_parents "${branch}_EMBARGO" $parents esac -done < "$branches" +done