mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
install-deps.sh: use "apt" for checking install status
as "dpkg -s <package-name>" always returns 0 even if the <package> is removed. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
ea64c4909f
commit
f91adafa4b
@ -139,7 +139,7 @@ function install_pkg_on_ubuntu {
|
||||
missing_pkgs="$@"
|
||||
else
|
||||
for pkg in $pkgs; do
|
||||
if ! dpkg -s $pkg &> /dev/null; then
|
||||
if ! apt -qq list $pkg 2>/dev/null | grep -q installed; then
|
||||
missing_pkgs+=" $pkg"
|
||||
fi
|
||||
done
|
||||
@ -154,7 +154,7 @@ function install_pkg_on_ubuntu {
|
||||
|
||||
function install_boost_on_ubuntu {
|
||||
local codename=$1
|
||||
if dpkg -s ceph-libboost1.67-dev &> /dev/null; then
|
||||
if apt -qq list ceph-libboost1.67-dev 2>/dev/null | grep -q installed; then
|
||||
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove 'ceph-libboost.*1.67.*'
|
||||
$SUDO rm /etc/apt/sources.list.d/ceph-libboost1.67.list
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user