From a3218e28a67818dd52f56b6a3c2886a6522f8779 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Wed, 4 Sep 2013 17:54:38 +0200 Subject: [PATCH] Finish -K implementation. --- openup | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/openup b/openup index 6163827..a942ea7 100755 --- a/openup +++ b/openup @@ -151,7 +151,7 @@ update_binpatches() { if [ -n "${exclude_kernel}" ]; then _BP=$(echo ${_BP} | sed -e "s,binpatch${_REL_INT}-${_ARCH}-kernel,,g") fi - pr_bigarrow "Updating binpatch(es)" + pr_bigarrow "Installing/updating binpatch(es)" _CMD="pkg_add ${pkg_opt} ${_BP}" pr_smallarrow "${_CMD}" eval ${_CMD} @@ -164,14 +164,12 @@ update_pkg() { _PKG=$(pkg_info -q | perl -ne '/^(.*)-(\d[^-]*)[-]?(\w*)(.*)$/ && print "$1\n"' | \ grep -v binpatch${_REL_INT}-${_ARCH}) - if [ -n "${_PKG}" ]; then - pr_bigarrow "Updating package(s)" - _CMD="pkg_add -u ${pkg_opt}" - pr_smallarrow "${_CMD}" - # we don't want to display ${_PKG}, there could be hundreds - _CMD="${_CMD} ${_PKG}" - eval ${_CMD} - fi + pr_bigarrow "Updating package(s)" + _CMD="pkg_add -u ${pkg_opt}" + pr_smallarrow "${_CMD}" + # we don't want to display ${_PKG}, there could be hundreds + _CMD="${_CMD} ${_PKG}" + eval ${_CMD} } # this only outputs the most recent vulnerability for each pkg @@ -183,6 +181,10 @@ check_vuxml() { _BP_MATCH="$(grep binpatch ${_TMPVUXML} | sed -e 's,,,g;s,,,g;s,\$ARCH,'"${_ARCH}"',g' | sort -u)" + if [ -n "${exclude_kernel}" ]; then + _BP_MATCH=$(echo ${_BP_MATCH} | sed -e "s,binpatch${_REL_INT}-${_ARCH}-kernel,,g") + fi + _PAT=$(pkg_info -q | perl -ne '/^(.*)-(\d[^-]*)[-]?(\w*)(.*)$/ && print "$1\n"' | \ grep -v binpatch${_REL_INT}-${_ARCH} | \ while read l; do echo -n "|$l"; done | \