]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
install-deps.sh: refresh package index before installing dependencies 63834/head
authorKefu Chai <tchaikov@gmail.com>
Tue, 10 Jun 2025 08:21:54 +0000 (16:21 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 10 Jun 2025 08:38:00 +0000 (16:38 +0800)
commitd4c6b9c8039b0ce82da61b00a2376bfe8826f0c0
treeffc811d43f350a604bd85cfec4da16f1037b4196
parent3fb436a0c703417a3a762503881c401af1a1b4d3
install-deps.sh: refresh package index before installing dependencies

Fix dependency installation failures caused by outdated package indexes
on Debian-based systems. When the host's package index is stale, package
installation can fail with HTTP 404 errors because updated packages are
no longer available at their cached URLs.

Recent build server failures show this issue:

```
E: Failed to fetch http://us.ports.ubuntu.com/ubuntu-ports/pool/main/o/openldap/libldap-2.5-0_2.5.18%2bdfsg-0ubuntu0.22.04.3_arm64.deb  404  Not Found [IP: 91.189.91.104 80]
E: Failed to fetch http://us.ports.ubuntu.com/ubuntu-ports/pool/main/o/openldap/libldap-dev_2.5.18%2bdfsg-0ubuntu0.22.04.3_arm64.deb  404  Not Found [IP: 91.189.91.104 80]
E: Failed to fetch http://us.ports.ubuntu.com/ubuntu-ports/pool/main/o/openldap/libldap2-dev_2.5.18%2bdfsg-0ubuntu0.22.04.3_all.deb  404  Not Found [IP: 91.189.91.104 80]
```

In this change, we add `apt-get update` before installing the
ceph-build-deps meta package, following the same pattern used in
ensure_decent_gcc_on_ubuntu().

Note: Additional `apt-get update` calls are still required when installing
packages from custom repositories after adding their source lists.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
install-deps.sh