From 782f331b106c729fac6904e22664770af9631705 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 6 Dec 2014 18:10:08 +0100 Subject: [PATCH] xbps-src: repair running post-install hooks. --- common/xbps-src/libexec/xbps-src-doinstall.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/xbps-src/libexec/xbps-src-doinstall.sh b/common/xbps-src/libexec/xbps-src-doinstall.sh index 9d2d7812a49..3f0178fe474 100755 --- a/common/xbps-src/libexec/xbps-src-doinstall.sh +++ b/common/xbps-src/libexec/xbps-src-doinstall.sh @@ -74,10 +74,11 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then exit 0 fi +XBPS_SUBPKG_INSTALL_DONE="$wrksrc/.xbps_${XBPS_CROSS_BUILD}_${PKGNAME}_install_done" + # If it's a subpkg execute the pkg_install() function. -if [ "$sourcepkg" != "$PKGNAME" ]; then - XBPS_SUBPKG_INSTALL_DONE="$wrksrc/.xbps_${XBPS_CROSS_BUILD}_${PKGNAME}_install_done" - if [ ! -f $XBPS_SUBPKG_INSTALL_DONE ]; then +if [ ! -f $XBPS_SUBPKG_INSTALL_DONE ]; then + if [ "$sourcepkg" != "$PKGNAME" ]; then # Source all subpkg environment setup snippets. for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do source_file "$f" @@ -90,10 +91,10 @@ if [ "$sourcepkg" != "$PKGNAME" ]; then export XBPS_PKGDESTDIR=1 run_func pkg_install fi - setup_pkg_depends $pkgname - run_pkg_hooks post-install - touch -f $XBPS_SUBPKG_INSTALL_DONE fi + setup_pkg_depends ${pkgname:=$PKGNAME} + run_pkg_hooks post-install + touch -f $XBPS_SUBPKG_INSTALL_DONE fi exit 0