Log to stderr in update-go-path.sh and drop the pinned Go package hint
This commit is contained in:
@@ -32,8 +32,8 @@ GO_ROOT=""
|
|||||||
RUN_DEFCONFIG=true
|
RUN_DEFCONFIG=true
|
||||||
DRY_RUN=false
|
DRY_RUN=false
|
||||||
|
|
||||||
info() { echo "[INFO] $*"; }
|
info() { echo "[INFO] $*" >&2; }
|
||||||
warn() { echo "[WARN] $*"; }
|
warn() { echo "[WARN] $*" >&2; }
|
||||||
err() { echo "[ERROR] $*" >&2; }
|
err() { echo "[ERROR] $*" >&2; }
|
||||||
|
|
||||||
usage() { sed -n '2,25p' "$0" | sed 's/^# \{0,1\}//;s/^#$//'; }
|
usage() { sed -n '2,25p' "$0" | sed 's/^# \{0,1\}//;s/^#$//'; }
|
||||||
@@ -78,8 +78,9 @@ if [ -z "$GO_ROOT" ]; then
|
|||||||
|
|
||||||
if [ ${#GO_DIRS[@]} -eq 0 ]; then
|
if [ ${#GO_DIRS[@]} -eq 0 ]; then
|
||||||
err "No Go installation found under /usr/lib/go-*, /usr/local/go or /usr/lib/golang."
|
err "No Go installation found under /usr/lib/go-*, /usr/local/go or /usr/lib/golang."
|
||||||
err "Install one with: sudo apt install golang-1.24-go"
|
err "Install Go from your distribution or from https://go.dev/dl/, or pass"
|
||||||
err "or keep the default, where OpenWrt builds its own bootstrap chain."
|
err "--go-root <dir>; or keep the default, where OpenWrt builds its own"
|
||||||
|
err "bootstrap chain."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -122,7 +123,7 @@ if [ -f "$BOOTSTRAP_MK" ]; then
|
|||||||
if [ -n "$NEED" ] &&
|
if [ -n "$NEED" ] &&
|
||||||
[ "$(printf '%s\n%s\n' "$NEED" "$GO_VER" | sort -V | head -n 1)" != "$NEED" ]; then
|
[ "$(printf '%s\n%s\n' "$NEED" "$GO_VER" | sort -V | head -n 1)" != "$NEED" ]; then
|
||||||
warn "Installed Go $GO_VER is older than the bootstrap version $NEED this tree expects."
|
warn "Installed Go $GO_VER is older than the bootstrap version $NEED this tree expects."
|
||||||
warn "The build may fail; consider installing golang-$NEED-go."
|
warn "The build may fail; install Go $NEED or newer, or drop --external."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user