forked from mirrors/openup
Implement binpatch support in cron (-c) mode.
This finishes the initial implementation of openup...
This commit is contained in:
parent
9d4f46f0a8
commit
f68e518450
1 changed files with 17 additions and 8 deletions
17
openup
17
openup
|
|
@ -181,16 +181,25 @@ update_pkg() {
|
||||||
|
|
||||||
# this only outputs the most recent vulnerability for each pkg
|
# this only outputs the most recent vulnerability for each pkg
|
||||||
check_vuxml() {
|
check_vuxml() {
|
||||||
local _OUTDATED
|
local _BP _BP_OUTDATED _PKG_OUTDATED
|
||||||
|
|
||||||
ftp -Vo ${_TMPVUXML} ${VUXML_URL} >/dev/null
|
ftp -Vo ${_TMPVUXML} ${VUXML_URL} >/dev/null
|
||||||
|
perl -pi -e 's,\$ARCH,'"$(arch -s)"',g' ${_TMPVUXML}
|
||||||
|
|
||||||
_OUTDATED=$(pkg_add -nuv -D nosig 2>/dev/null | \
|
_BP=$(pkg_info -Q binpatch${_REL_INT}-$(arch -s) | sed 's/.[^-]*$//' | sort -u | tr '\n' ' ')
|
||||||
grep '(installing)(pretending)' | \
|
_BP_OUTDATED=$(pkg_add -nv -D nosig ${_BP} 2>/dev/null | \
|
||||||
|
grep '^Adding.*(pretending)' | \
|
||||||
|
sort -u | \
|
||||||
sed -e 's,Adding ,,;s,(pretending),,;s,->.*,,' | \
|
sed -e 's,Adding ,,;s,(pretending),,;s,->.*,,' | \
|
||||||
perl -ne '/^(.*)-(\d[^-]*)[-]?(\w*)(.*)$/ && print "$1\n"')
|
perl -ne '/^(.*)-(\d[^-]*)[-]?(\w*)(.*)$/ && print "$1\n"')
|
||||||
|
|
||||||
for p in ${_OUTDATED}
|
_PKG_OUTDATED=$(pkg_add -nuv -D nosig 2>/dev/null | \
|
||||||
|
grep '(installing)(pretending)' | \
|
||||||
|
grep -v binpatch${_REL_INT}-$(arch -s) | \
|
||||||
|
sed -e 's,Adding ,,;s,(pretending),,;s,->.*,,' | \
|
||||||
|
perl -ne '/^(.*)-(\d[^-]*)[-]?(\w*)(.*)$/ && print "$1\n"')
|
||||||
|
|
||||||
|
for p in ${_BP_OUTDATED} ${_PKG_OUTDATED}
|
||||||
do
|
do
|
||||||
pr_bigarrow "${p} <"
|
pr_bigarrow "${p} <"
|
||||||
# XXX how do we print only the 1st matching range in awk?
|
# XXX how do we print only the 1st matching range in awk?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue