diff --git a/common/xbps-src/libexec/xbps-src-dobuild.sh b/common/xbps-src/libexec/xbps-src-dobuild.sh index 5b4b17dcb2a..af71cb8c49b 100755 --- a/common/xbps-src/libexec/xbps-src-dobuild.sh +++ b/common/xbps-src/libexec/xbps-src-dobuild.sh @@ -47,8 +47,6 @@ run_pkg_hooks pre-build # Run pre_build() if [ ! -f $XBPS_PRE_BUILD_DONE ]; then - cd $wrksrc - [ -n "$build_wrksrc" ] && cd $build_wrksrc if declare -f pre_build >/dev/null; then run_func pre_build touch -f $XBPS_PRE_BUILD_DONE @@ -56,8 +54,6 @@ if [ ! -f $XBPS_PRE_BUILD_DONE ]; then fi # Run do_build() -cd $wrksrc -[ -n "$build_wrksrc" ] && cd $build_wrksrc if declare -f do_build >/dev/null; then run_func do_build else @@ -76,8 +72,6 @@ touch -f $XBPS_BUILD_DONE # Run post_build() if [ ! -f $XBPS_POST_BUILD_DONE ]; then - cd $wrksrc - [ -n "$build_wrksrc" ] && cd $build_wrksrc if declare -f post_build >/dev/null; then run_func post_build touch -f $XBPS_POST_BUILD_DONE diff --git a/common/xbps-src/libexec/xbps-src-doconfigure.sh b/common/xbps-src/libexec/xbps-src-doconfigure.sh index 54353fc0c0f..cd4c070ab80 100755 --- a/common/xbps-src/libexec/xbps-src-doconfigure.sh +++ b/common/xbps-src/libexec/xbps-src-doconfigure.sh @@ -42,10 +42,6 @@ run_pkg_hooks pre-configure # Run pre_configure() if [ ! -f $XBPS_PRECONFIGURE_DONE ]; then - cd $wrksrc - if [ -n "$build_wrksrc" ]; then - cd $build_wrksrc - fi if declare -f pre_configure >/dev/null; then run_func pre_configure touch -f $XBPS_PRECONFIGURE_DONE @@ -53,10 +49,6 @@ if [ ! -f $XBPS_PRECONFIGURE_DONE ]; then fi # Run do_configure() -cd $wrksrc -if [ -n "$build_wrksrc" ]; then - cd $build_wrksrc -fi if declare -f do_configure >/dev/null; then run_func do_configure else @@ -75,10 +67,6 @@ touch -f $XBPS_CONFIGURE_DONE # Run post_configure() if [ ! -f $XBPS_POSTCONFIGURE_DONE ]; then - cd $wrksrc - if [ -n "$build_wrksrc" ]; then - cd $build_wrksrc - fi if declare -f post_configure >/dev/null; then run_func post_configure touch -f $XBPS_POSTCONFIGURE_DONE diff --git a/common/xbps-src/libexec/xbps-src-doinstall.sh b/common/xbps-src/libexec/xbps-src-doinstall.sh index c52cc904e54..d5ace25bc7a 100755 --- a/common/xbps-src/libexec/xbps-src-doinstall.sh +++ b/common/xbps-src/libexec/xbps-src-doinstall.sh @@ -28,14 +28,14 @@ XBPS_INSTALL_DONE="$wrksrc/.xbps_${sourcepkg}_${XBPS_CROSS_BUILD}_install_done" XBPS_PRE_INSTALL_DONE="$wrksrc/.xbps_${sourcepkg}_${XBPS_CROSS_BUILD}_pre_install_done" XBPS_POST_INSTALL_DONE="$wrksrc/.xbps_${sourcepkg}_${XBPS_CROSS_BUILD}_post_install_done" +cd $wrksrc || msg_error "$pkgver: cannot access to wrksrc [$wrksrc]\n" +if [ -n "$build_wrksrc" ]; then + cd $build_wrksrc || msg_error "$pkgver: cannot access to build_wrksrc [$build_wrksrc]\n" +fi + if [ ! -f $XBPS_INSTALL_DONE ]; then mkdir -p $XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/$pkgname-$version - cd $wrksrc || msg_error "$pkgver: cannot access to wrksrc [$wrksrc]\n" - if [ -n "$build_wrksrc" ]; then - cd $build_wrksrc || msg_error "$pkgver: cannot access to build_wrksrc [$build_wrksrc]\n" - fi - run_pkg_hooks pre-install # Run pre_install()