On test-aptsource-pkg-install test, the conditional for legacy distros is not being evaluated and is giving false negatives.
On the last tag actions you can see unexpected operator in the test logs
+test-aptsource-pkg-install | distro=ubuntu:focal repo=ros2
+test-aptsource-pkg-install | --> RUN if [ "$legacy_distros" == *"$distro"* ]; then if grep 'BEGIN PGP PUBLIC KEY BLOCK' /usr/share/ros-apt-source/${repo}.sources > /dev/null ; then exit 0; else exit 1; fi; fi;
+test-aptsource-pkg-install | /bin/sh: 1: [: ubuntu:focal debian:buster debian:bullseye: unexpected operator
This causes that for legacy distros that section of the test is being skipped.
I've tested modifying the conditional if with a case:
RUN case "$legacy_distros" in \
*"$distro"*) \
echo "Distro legacy detected: $distro"; \
if grep 'BEGIN PGP PUBLIC KEY BLOCK' /usr/share/ros-apt-source/${repo}.sources > /dev/null; then \
exit 0; \
else \
exit 1; \
fi \
;; \
*) \
echo "Distro not legacy: $distro. Skipping check."; \
exit 0; \
;; \
esac
But this gives me errors in the legacy distros (focal & buster) when the case is evaluated. I'll investigate further to validate that the PGP key is present in the file.
On
test-aptsource-pkg-installtest, the conditional for legacy distros is not being evaluated and is giving false negatives.On the last tag actions you can see
unexpected operatorin the test logsThis causes that for legacy distros that section of the test is being skipped.
I've tested modifying the conditional
ifwith acase:But this gives me errors in the legacy distros (focal & buster) when the case is evaluated. I'll investigate further to validate that the PGP key is present in the file.