Lightweight coding agent that runs in your terminal
Rust
[experimental] nit: try to speed up apt-install (#10163)
jif-oai2945667dcc7b
diff --git a/.github/workflows/shell-tool-mcp.yml b/.github/workflows/shell-tool-mcp.ymlindex 57bfdd5f5b..3273bb47bc 100644--- a/.github/workflows/shell-tool-mcp.yml+++ b/.github/workflows/shell-tool-mcp.yml@@ -248,8 +248,32 @@ jobs:run: |set -euo pipefailif command -v apt-get >/dev/null 2>&1; then- apt-get update- DEBIAN_FRONTEND=noninteractive apt-get install -y git build-essential bison autoconf gettext+ # On Ubuntu ARM containers, apt metadata for universe/multiverse is large and+ # can make `apt-get update` very slow. We only need packages from `main`, so+ # trim sources to `main` for faster, more reliable updates.+ if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]] && [[ -f /etc/os-release ]]; then+ . /etc/os-release+ if [[ "${ID-}" == "ubuntu" ]]; then+ codename="${VERSION_CODENAME:-}"+ if [[ -n "$codename" ]]; then+ printf '%s\n' \+ "deb http://ports.ubuntu.com/ubuntu-ports ${codename} main" \+ "deb http://ports.ubuntu.com/ubuntu-ports ${codename}-updates main" \+ "deb http://ports.ubuntu.com/ubuntu-ports ${codename}-backports main" \+ "deb http://ports.ubuntu.com/ubuntu-ports ${codename}-security main" \+ >/etc/apt/sources.list+ fi+ fi+ fi++ apt_opts=(+ -o Acquire::Retries=3+ -o Acquire::http::Timeout=30+ -o Acquire::https::Timeout=30+ -o Acquire::Languages=none+ )+ apt-get "${apt_opts[@]}" update+ DEBIAN_FRONTEND=noninteractive apt-get "${apt_opts[@]}" install -y git build-essential bison autoconf gettextelif command -v dnf >/dev/null 2>&1; thendnf install -y git gcc gcc-c++ make bison autoconf gettextelif command -v yum >/dev/null 2>&1; then