xbps-src: 'checkvers' target even faster.
This commit is contained in:
parent
f3ef6b7580
commit
e29912574f
@ -38,24 +38,25 @@ check_installed_packages()
|
||||
msg_normal "Checking for newer packages from srcpkgs, please wait...\n"
|
||||
for f in $(${XBPS_BIN_CMD} list|awk '{print $1}'); do
|
||||
lpkgn=$(${XBPS_PKGDB_CMD} getpkgname ${f})
|
||||
lpkgver=$(${XBPS_PKGDB_CMD} getpkgversion ${f})
|
||||
|
||||
if [ ! -r ${XBPS_SRCPKGDIR}/${lpkgn}/template ]; then
|
||||
msg_warn "Installed package ${f} not available as source pkg, skipping.\n"
|
||||
continue
|
||||
fi
|
||||
. ${XBPS_SRCPKGDIR}/${lpkgn}/template
|
||||
if [ -r ${XBPS_SRCPKGDIR}/${lpkgn}/${lpkgn}.template ]; then
|
||||
. ${XBPS_SRCPKGDIR}/${lpkgn}/template
|
||||
unset revision
|
||||
sourcepkg=$pkgname
|
||||
. ${XBPS_SRCPKGDIR}/${lpkgn}/${lpkgn}.template
|
||||
else
|
||||
if [ ! -r ${XBPS_SRCPKGDIR}/${lpkgn}/template ]; then
|
||||
msg_warn "Installed package ${f} not available as source pkg, skipping.\n"
|
||||
continue
|
||||
fi
|
||||
. ${XBPS_SRCPKGDIR}/${lpkgn}/template
|
||||
fi
|
||||
if [ -n "$revision" ]; then
|
||||
srcpkgver="${version}_${revision}"
|
||||
srcpkgver="${lpkgn}-${version}_${revision}"
|
||||
else
|
||||
srcpkgver="${version}"
|
||||
srcpkgver="${lpkgn}-${version}"
|
||||
fi
|
||||
${XBPS_CMPVER_CMD} ${lpkgver} ${srcpkgver}
|
||||
${XBPS_CMPVER_CMD} ${f} ${srcpkgver}
|
||||
rv=$?
|
||||
if [ $rv -eq 255 ]; then
|
||||
echo "[$XBPS_MASTERDIR] ${f} < ${srcpkgver} [srcpkgs]"
|
||||
|
Loading…
x
Reference in New Issue
Block a user