Debian Codegraph @

debian/tests/can-install-jre

raw
1 #!/bin/bash
2
3 set -e
4
5 versions=$(apt-cache -n search jre-headless | awk '{print $1}')
6 for version in ${versions}
7 do
8 # WHEN openjdk-jre-headless package is installed from scratch
9
10 # Java 18 is EOL 09.2022 but is present in Lunar so that we could do clean
11 # builds. Ignore it in certificate tests
12 if [[ ${version} == "openjdk-18-jre-headless" ]];
13 then
14 continue
15 fi
16 output=`mktemp`
17 echo "installing ${version}"
18 apt-get install -y ${version} | tee ${output}
19 # THEN installation is successfull
20 # AND certificates are updated
21 if [[ $(grep -L "Adding debian:Amazon_Root_CA_1.pem" ${output}) ]]; then
22 echo "Certificates were not imported !!!"
23 exit 255
24 fi
25 rm $output
26 # purge in order to remove keytstore
27 apt-get purge -y ca-certificates-java ${version}
28 done