Add support for nonstandard cherrypicks

This commit is contained in:
2025-12-19 12:45:41 -05:00
parent f3831e097d
commit 16e401789a
2 changed files with 39 additions and 5 deletions

View File

@@ -571,14 +571,34 @@ from_source() {
fi fi
fi fi
# Add cherrypick commits if specified in profile (skip if already included) # Add cherrypicks
for entry in ${P_ARR[cherrypicks]}; do for entry in ${P_ARR[cherrypicks]}; do
remote="${entry%%:*}" url_branch="${entry%%:*}"
commit="${entry##*:}" commit="${entry##*:}"
if ! git -C "$BUILD_DIR" remote | grep -q "^$remote$"; then
execute git -C "$BUILD_DIR" remote add "$remote" "https://github.com/$remote/openwrt.git" branch=""
url="$url_branch"
if [[ "$url_branch" == *"@"* ]]; then
url="${url_branch%@*}"
branch="${url_branch#*@}"
fi
remote="${url%.git}"
remote="${remote##*/}"
remote=${remote//[^A-Za-z0-9._-]/_}
[[ -z $remote ]] && remote="cherry"
if ! git -C "$BUILD_DIR" remote | grep -q "^$remote$"; then
execute git -C "$BUILD_DIR" remote add "$remote" "$url"
else
execute git -C "$BUILD_DIR" remote set-url "$remote" "$url"
fi
if [[ -n $branch ]]; then
execute git -C "$BUILD_DIR" fetch "$remote" "$branch"
else
execute git -C "$BUILD_DIR" fetch "$remote"
fi fi
execute git -C "$BUILD_DIR" fetch "$remote"
execute git -C "$BUILD_DIR" merge-base --is-ancestor "$commit" HEAD || execute git -C "$BUILD_DIR" merge-base --is-ancestor "$commit" HEAD ||
execute git -C "$BUILD_DIR" cherry-pick "$commit" execute git -C "$BUILD_DIR" cherry-pick "$commit"
done done

View File

@@ -80,6 +80,20 @@ declare -Ag w1700k=(
smcroute avahi-daemon \ smcroute avahi-daemon \
lm-sensors samba4-server luci-app-samba4 tailscale shadow-useradd \ lm-sensors samba4-server luci-app-samba4 tailscale shadow-useradd \
ethtool ca-bundle tailscale" ethtool ca-bundle tailscale"
[cherrypicks]="\
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:4cfd50f648 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:bbf3e6d7e1 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:59bb20c522 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:1d58331f5c \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:c2712ff093 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:dc3dd61835 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:32caca6a76 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:cf66b89f84 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:ef002d6422 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:af3e569610 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:66b0757616 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:1c7d47a1f4 \
https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:94d9ad7d4c"
) )
declare -Ag rpi4=( declare -Ag rpi4=(