Skip to content

Commit 2cea243

Browse files
committed
Fix ID_LIKE checks on debian
On Ubuntu the ID_LIKE variable is set, but on debian it is not. So check for ID_LIKE, but if it's not set, fall back to ID.
1 parent 61f7256 commit 2cea243

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

bootstrap.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if [[ "$ID" == "fedora" ]]; then
2323
tar \
2424
xz
2525
)
26-
elif [[ "$ID_LIKE" == "debian" ]]; then
26+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
2727
export DEBIAN_FRONTEND=noninteractive
2828
(set -x;
2929
$sudo apt-get -y install \

external/qemu/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [[ "$ID" == "fedora" ]]; then
2424
ninja-build \
2525
pixman-devel
2626
)
27-
elif [[ "$ID_LIKE" == "debian" ]]; then
27+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
2828
(set -x; $sudo apt-get -y install \
2929
bison \
3030
bzip2 \

root-disks/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
package_manager="dnf"
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
package_manager="apt-get"
1616
else
1717
echo "Unsupported distro!" >&2

tests/audit-testsuite/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [[ "$ID" == "fedora" ]]; then
2424
nmap-ncat \
2525
psmisc
2626
)
27-
elif [[ "$ID_LIKE" == "debian" ]]; then
27+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
2828
export DEBIAN_FRONTEND=noninteractive
2929
(set -x; \
3030
$sudo apt-get -y install \

tests/golang-build/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install glibc-static golang tar)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
(set -x; $sudo apt-get -y install libc6-dev golang-go tar)
1616
else
1717
echo "Unsupported distro!" >&2

tests/hugetlbfs/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install autoconf libtool make gcc)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
export DEBIAN_FRONTEND=noninteractive
1616
(set -x; $sudo apt-get -y install build-essential)
1717
else

tests/kernel-build/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [[ "$ID" == "fedora" ]]; then
2222
openssl-devel \
2323
;
2424
)
25-
elif [[ "$ID_LIKE" == "debian" ]]; then
25+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
2626
export DEBIAN_FRONTEND=noninteractive
2727
(set -x; $sudo apt-get -y install gcc binutils bc flex bison)
2828
else

tests/libkcapi/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [[ "$ID" == "fedora" ]]; then
2121
pkgconf-pkg-config \
2222
util-linux
2323
)
24-
elif [[ "$ID_LIKE" == "debian" ]]; then
24+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
2525
export DEBIAN_FRONTEND=noninteractive
2626
(set -x; $sudo apt-get -y install autoconf \
2727
automake \

tests/ltp/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install gcc)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
(set -x; $sudo apt-get -y install gcc)
1616
else
1717
echo "Unsupported distro!" >&2

tests/multichase/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install make gcc)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
export DEBIAN_FRONTEND=noninteractive
1616
(set -x; $sudo apt-get -y install build-essential)
1717
else

tests/perf_event_tests/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install make gcc)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
export DEBIAN_FRONTEND=noninteractive
1616
(set -x; $sudo apt-get -y install build-essential)
1717
else

tests/strace/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install gcc)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
(set -x; $sudo apt-get -y install gcc)
1616
else
1717
echo "Unsupported distro!" >&2

tests/vdsotest/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install autoconf diffutils file libtool make gcc)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
export DEBIAN_FRONTEND=noninteractive
1616
(set -x; $sudo apt-get -y install autoconf diffutils file libtool build-essential)
1717
else

tests/will-it-scale/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
if [[ "$ID" == "fedora" ]]; then
1313
(set -x; $sudo dnf -y install gcc hwloc-devel make)
14-
elif [[ "$ID_LIKE" == "debian" ]]; then
14+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
1515
export DEBIAN_FRONTEND=noninteractive
1616
(set -x; $sudo apt-get -y install build-essential libhwloc-dev)
1717
else

tests/xfstests/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [[ "$ID" == "fedora" ]]; then
4040
xfsprogs \
4141
xfsprogs-devel
4242
)
43-
elif [[ "$ID_LIKE" == "debian" ]]; then
43+
elif [[ "${ID_LIKE:-$ID}" == "debian" ]]; then
4444
export DEBIAN_FRONTEND=noninteractive
4545
(set -x; $sudo apt-get -y install \
4646
attr \

0 commit comments

Comments
 (0)