From 68a6ca7e096a896fa99c9e2eeaaa9073629c4cee Mon Sep 17 00:00:00 2001 From: Marcus Furlong Date: Thu, 12 Nov 2020 09:44:18 -0500 Subject: [PATCH] fix zypper lr command (#259) fixes #258 --- client/patchman-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/patchman-client b/client/patchman-client index ddf20bd2..990e8dd1 100755 --- a/client/patchman-client +++ b/client/patchman-client @@ -331,7 +331,7 @@ get_repos() { if [ ${verbose} == 1 ] ; then echo 'Finding zypper repos...' fi - for i in $(zypper --no-refresh lr -E -u --details | tail -n +5 | cut -d "|" -f 2,3,7,9 | sed -e "s/ *|/ ${host_arch} |/" -e "s/^ /'/g" -e "s/ *| */' '/g" -e "s/ *$/'/g") ; do + for i in $(zypper -q --no-refresh lr -E -u --details | grep -v ^$ | tail -n +3 | cut -d "|" -f 2,3,7,9 | sed -e "s/ *|/ ${host_arch} |/" -e "s/^ /'/g" -e "s/ *| */' '/g" -e "s/ *$/'/g") ; do echo \'rpm\' ${i} >> "${tmpfile_rep}" done fi