From bc4146555ceaaf03c924ef9263050d8caee2f580 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Thu, 19 Mar 2020 10:51:02 +0100 Subject: [PATCH] [PKGS-7388] Only perform test when all conditions are correct --- include/tests_ports_packages | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/tests_ports_packages b/include/tests_ports_packages index f2291a03..484607e4 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -982,17 +982,19 @@ ################################################################################# # # Test : PKGS-7388 - # Description : Check security repository in Debian/ubuntu apt sources.list file + # Description : Check security repository in Debian/Ubuntu apt sources.list file + PREQS_MET="NO" if [ -f ${ROOTDIR}etc/apt/sources.list -a -d ${ROOTDIR}etc/apt/sources.list.d ]; then case "${LINUX_VERSION}" in - "Debian" | "Linux Mint" | "Ubuntu") PREQS_MET="YES" ;; + "Debian" | "Linux Mint" | "Ubuntu") + PREQS_MET="YES" + ;; *) - PREQS_MET="NO" LogText "Skipping test, although sources.list or sources.list.d exists. This specific OS version most likely has no security repository" ;; esac fi - Register --test-no PKGS-7388 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check security repository in Debian/ubuntu apt sources.list file" + Register --test-no PKGS-7388 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check security repository in apt sources.list file" if [ $SKIPTEST -eq 0 ]; then FOUND=0 if [ ${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY} -eq 0 ]; then