From e210d7f3b6a51068427815c98543c91ba30b9589 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 19 Feb 2018 15:01:59 +0100 Subject: [PKGS-7384] changes to detect yum-utils package and related tooling --- include/tests_ports_packages | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/tests_ports_packages b/include/tests_ports_packages index df9b5267..4bc963ba 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -826,11 +826,12 @@ if [ ! -z "${YUMBINARY}" -a -z "${DNFBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no PKGS-7384 --preqs-met ${PREQS_MET} --os Linux --weight L --network NO --category security --description "Check for YUM utils package" if [ ${SKIPTEST} -eq 0 ]; then - if [ -x ${ROOTDIR}usr/bin/package-cleanup ]; then - LogText "Result: found YUM utils package (${ROOTDIR}usr/bin/package-cleanup)" + # package-cleanup tool can be found in different locations + if [ -x ${ROOTDIR}bin/package-cleanup -o -x ${ROOTDIR}usr/bin/package-cleanup ]; then + LogText "Result: found YUM utils package (package-cleanup)" # Check for duplicates LogText "Test: Checking for duplicate packages" - FIND=$(${ROOTDIR}usr/bin/package-cleanup -q --dupes > /dev/null; echo $?) + FIND=$(package-cleanup -q --dupes > /dev/null; echo $?) if [ "${FIND}" = "0" ]; then LogText "Result: No duplicate packages found" Display --indent 2 --text "- Checking package database duplicates" --result "${STATUS_OK}" --color GREEN @@ -843,7 +844,7 @@ # Check for package database problems LogText "Test: Checking for database problems" - FIND=$(${ROOTDIR}usr/bin/package-cleanup --problems > /dev/null; echo $?) + FIND=$(package-cleanup --problems > /dev/null; echo $?) if [ "${FIND}" = "0" ]; then LogText "Result: No package database problems found" Display --indent 2 --text "- Checking package database for problems" --result "${STATUS_OK}" --color GREEN -- cgit v1.2.3