1
0
Fork 0
forked from mirrors/openup

Finish -K implementation.

This commit is contained in:
Antoine Jacoutot 2013-09-04 17:54:38 +02:00
commit a3218e28a6

20
openup
View file

@ -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,<name>,,g;s,</name>,,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 | \