1
0
Fork 0
forked from mirrors/openup

binpatches can only be found in PKG_PATH_UPDATE{,_LTS) and we

want to make sure we search in all paths and don't stop at the
first match we find
This commit is contained in:
Antoine Jacoutot 2014-06-10 12:26:50 +02:00
commit 5934a41d92

11
openup
View file

@ -37,7 +37,7 @@ PKG_PATH_MAIN="http://ftp.fr.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch
# PKG_PATH for the corresponding release stable service # PKG_PATH for the corresponding release stable service
PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)" PKG_PATH_UPDATE="https://stable.mtier.org/updates/$(uname -r)/$(arch -s)"
# PKG_PATH addition for the corresponding LTS release stable service # PKG_PATH addition for the corresponding LTS release stable service
#PKG_PATH_UPDATE="https://user%domain.tld:password@stable.mtier.org/updates-lts/$(uname -r)/$(arch -s):${PKG_PATH_UPDATE}" #PKG_PATH_UPDATE_LTS="https://user%domain.tld:password@stable.mtier.org/updates-lts/$(uname -r)/$(arch -s)"
# URL to the latest vuxml (vulnerabilities database) # URL to the latest vuxml (vulnerabilities database)
VUXML_URL="https://stable.mtier.org/vuxml/${_REL_INT}.xml" VUXML_URL="https://stable.mtier.org/vuxml/${_REL_INT}.xml"
# exclusion list: pkg names without version/flavor, separated by space # exclusion list: pkg names without version/flavor, separated by space
@ -97,7 +97,7 @@ _TMPSPLITCERT="${_TMPDIR}/cert"
_TMPVUXML="${_TMPDIR}/vuxml" _TMPVUXML="${_TMPDIR}/vuxml"
_PID="/var/run/${0##*/}.pid" _PID="/var/run/${0##*/}.pid"
export PKG_PATH=${PKG_PATH_UPDATE}:${PKG_PATH_MAIN} export PKG_PATH=${PKG_PATH_UPDATE_LTS}:${PKG_PATH_UPDATE}:${PKG_PATH_MAIN}
trap "rm -rf ${_TMPDIR} ${_PID}" 1 2 3 13 15 trap "rm -rf ${_TMPDIR} ${_PID}" 1 2 3 13 15
@ -192,7 +192,12 @@ rm_old_bp() {
update_binpatches() { update_binpatches() {
local _BP _CMD _b _e local _BP _CMD _b _e
_BP=$(pkg_info -Q binpatch${_REL_INT}-${_ARCH} | sed 's/.[^-]*$//' | sort -u) # binpatches can only be found in PKG_PATH_UPDATE{,_LTS) and we
# want to make sure we search in all paths and don't stop at the
# first match we find
for i in ${PKG_PATH_UPDATE_LTS} ${PKG_PATH_UPDATE}; do
_BP="$(pkg_info -Q binpatch${_REL_INT}-${_ARCH} | sed 's/.[^-]*$//' | sort -u)${_BP:+ ${_BP}}"
done
if [ -n "${_BP}" ]; then if [ -n "${_BP}" ]; then
for _e in ${EXCLUDE_PKG}; do for _e in ${EXCLUDE_PKG}; do