By default bindep will only list missing packages, but we want to list all packages. If we don't then some packages may have been automatically pulled in and they will get automatically removed (like ldap) Change-Id: I5e0b3bc8e1e41556c9e61e6e215dc90b4ee50ecd
25 lines
563 B
Bash
Executable File
25 lines
563 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
if [[ "${PYTHON3}" != "no" ]]; then
|
|
python3=python3
|
|
fi
|
|
|
|
PACKAGES=($(bindep -f /opt/loci/bindep.txt -b -l newline ${PROJECT} ${PROFILES} ${python3} || :))
|
|
|
|
if [[ ! -z ${PACKAGES} ]]; then
|
|
case ${distro} in
|
|
debian|ubuntu)
|
|
apt-get install -y --no-install-recommends ${PACKAGES[@]}
|
|
;;
|
|
centos)
|
|
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]}
|
|
;;
|
|
*)
|
|
echo "Unknown distro: ${distro}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
fi
|