From badcea5e8cca7a9a2e992f25bcacaad84e78d955 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 12 Nov 2011 11:33:40 +0100 Subject: [PATCH] xbps-src: verify_rundeps: set tmplf once. --- xbps-src/shutils/verify_rundeps.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/xbps-src/shutils/verify_rundeps.sh b/xbps-src/shutils/verify_rundeps.sh index b81f01d147..3e0e9426d7 100644 --- a/xbps-src/shutils/verify_rundeps.sh +++ b/xbps-src/shutils/verify_rundeps.sh @@ -44,7 +44,7 @@ find_rundep() verify_rundeps() { local j f nlib verify_deps maplib found_dup igndir - local broken rdep found rsonamef soname_list revbumped + local broken rdep found rsonamef soname_list revbumped tmplf maplib="$XBPS_COMMONVARSDIR/mapping_shlib_binpkg.txt" @@ -90,6 +90,11 @@ verify_rundeps() exec 0<&3 # restore stdin rm -f $depsftmp + if [ -f $XBPS_SRCPKGDIR/$pkgname/$pkgname.template ]; then + tmplf=$XBPS_SRCPKGDIR/$pkgname/$pkgname.template + else + tmplf=$XBPS_SRCPKGDIR/$pkgname/template + fi # # Add required run time packages by using required shlibs resolved # above, the mapping is done thru the mapping_shlib_binpkg.txt file. @@ -124,11 +129,6 @@ verify_rundeps() soname_list="${soname_list} ${f}" fi # Try to remove the line from template - if [ -f $XBPS_SRCPKGDIR/$pkgname/$pkgname.template ]; then - tmplf=$XBPS_SRCPKGDIR/$pkgname/$pkgname.template - else - tmplf=$XBPS_SRCPKGDIR/$pkgname/template - fi sed -i -r "/^Add_dependency run ${_rdep}([[:space:]]+\".*\")*$/d" $tmplf if find_rundep ${_rdep}; then Add_dependency run ${_rdep} @@ -188,11 +188,6 @@ verify_rundeps() if [ -n "$broken" ]; then msg_warn "$pkgver: shlibs changed... package has been revbumped!\n" - if [ -f $XBPS_SRCPKGDIR/$pkgname/$pkgname.template ]; then - tmplf=$XBPS_SRCPKGDIR/$pkgname/$pkgname.template - else - tmplf=$XBPS_SRCPKGDIR/$pkgname/template - fi _rev=$(egrep '^revision=.*' $tmplf) if [ -n "${_rev}" ]; then newrev=$((${_rev#revision=} + 1))