From d751208acae110d68c4b60db0ea3443ab41d5c08 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Thu, 8 Jul 2021 11:15:09 +0200 Subject: [PATCH] Collect explicit list of installed packages Change-Id: Ib8e1b002afc053617aa1f39c342bd1809d0154a4 --- scripts/collect-test-info.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/collect-test-info.sh b/scripts/collect-test-info.sh index c5b047fc7..b15736198 100755 --- a/scripts/collect-test-info.sh +++ b/scripts/collect-test-info.sh @@ -23,6 +23,15 @@ if [ -n "${VENV-}" ]; then $VENV/bin/pip freeze > "$LOG_LOCATION/pip/freeze-venv.log" fi +# Collect list of packages +if which rpm &> /dev/null; then + sudo rpm -qa | sort > $LOG_LOCATION/installed-pkgs.log +elif which apt &> /dev/null; then + sudo apt list --installed > $LOG_LOCATION/installed-pkgs.log +else + echo "Collecting list of packages not supported on this operating system." +fi + if [ -z "${TEST_VM_NODE_NAMES+x}" ]; then sudo sh -c "cp /var/log/libvirt/baremetal_logs/testvm[[:digit:]]_console.log ${LOG_LOCATION}" sudo chown $USER ${LOG_LOCATION}/testvm[[:digit:]]_console.log