Skip to content

Commit

Permalink
install-deps: Force remove ceph-libboost* packages
Browse files Browse the repository at this point in the history
As `apt-get remove ceph-libboost*` show the error and cause the make check failed.
`E: The package ceph-libboost1.79-dev needs to be reinstalled, but I can't find an archive for it.`
The ceph-libboost* packages may be not removed, so use `dpkg` to force remove ceph-libboost*.

Fixes: https://tracker.ceph.com/issues/64032

Signed-off-by: luo rixin <[email protected]>
  • Loading branch information
rosinL committed Jan 19, 2024
1 parent abd94a0 commit 0469112
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ function clean_boost_on_ubuntu {
# so no need to spare it.
if test -n "$installed_ver"; then
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y --fix-missing remove "ceph-libboost*"
# When an error occurs during `apt-get remove ceph-libboost*`, ceph-libboost* packages
# may be not removed, so use `dpkg` to force remove ceph-libboost*.
local ceph_libboost_pkgs=$(dpkg -l | grep ceph-libboost* | awk '{print $2}' |
awk -F: '{print $1}')
if test -n "$ceph_libboost_pkgs"; then
ci_debug "Force remove ceph-libboost* packages $ceph_libboost_pkgs"
$SUDO dpkg --purge --force-all $ceph_libboost_pkgs
fi
fi
}

Expand Down

0 comments on commit 0469112

Please sign in to comment.