From 60716882507ad471577878c415bb05337b281608 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 28 Oct 2011 11:07:05 +0200 Subject: [PATCH] xbps-src: optimize two funcs by removing redundant setup_tmpl() call. --- xbps-src/shutils/builddep_funcs.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xbps-src/shutils/builddep_funcs.sh b/xbps-src/shutils/builddep_funcs.sh index c7e1e4eac19..b365cc29426 100644 --- a/xbps-src/shutils/builddep_funcs.sh +++ b/xbps-src/shutils/builddep_funcs.sh @@ -249,16 +249,16 @@ install_dependencies_pkg() # check_pkgdep_matched() { - local pkg="$1" pkgname iver + local pkg="$1" pkgn iver [ -z "$pkg" ] && return 2 - pkgname="$($XBPS_PKGDB_CMD getpkgdepname ${pkg})" - setup_tmpl $pkgname + pkgn="$($XBPS_PKGDB_CMD getpkgdepname ${pkg})" + [ -z "$pkgn" ] && return 2 - iver="$($XBPS_PKGDB_CMD version $pkgname)" + iver="$($XBPS_PKGDB_CMD version $pkgn)" if [ -n "$iver" ]; then - ${XBPS_PKGDB_CMD} pkgmatch "${pkgname}-${iver}" "${pkg}" + ${XBPS_PKGDB_CMD} pkgmatch "${pkgn}-${iver}" "${pkg}" [ $? -eq 1 ] && return 0 fi @@ -271,16 +271,16 @@ check_pkgdep_matched() # check_installed_pkg() { - local pkg="$1" pkgname iver + local pkg="$1" pkgn iver [ -z "$pkg" ] && return 2 - pkgname="$($XBPS_PKGDB_CMD getpkgname ${pkg})" - setup_tmpl $pkgname + pkgn="$($XBPS_PKGDB_CMD getpkgname ${pkg})" + [ -z "$pkgn" ] && return 2 - iver="$($XBPS_PKGDB_CMD version $pkgname)" + iver="$($XBPS_PKGDB_CMD version $pkgn)" if [ -n "$iver" ]; then - ${XBPS_CMPVER_CMD} "${pkgname}-${iver}" "${pkg}" + ${XBPS_CMPVER_CMD} "${pkgn}-${iver}" "${pkg}" [ $? -eq 0 -o $? -eq 1 ] && return 0 fi