xbps-src: fix regressions introduced with -f <phase>.
This commit is contained in:
parent
1f4a588861
commit
21b2f6c3e8
2 changed files with 24 additions and 22 deletions
|
@ -62,10 +62,10 @@ $XBPS_LIBEXECDIR/xbps-src-dobuild.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
|||
[ "$XBPS_TARGET" = "build" ] && exit 0
|
||||
|
||||
# Install pkgs into destdir.
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $SOURCEPKG no $XBPS_CROSS_BUILD || exit 1
|
||||
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $subpkg $XBPS_CROSS_BUILD || exit 1
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $subpkg yes $XBPS_CROSS_BUILD || exit 1
|
||||
done
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$XBPS_LIBEXECDIR/xbps-src-prepkg.sh $subpkg $XBPS_CROSS_BUILD || exit 1
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#
|
||||
# Passed arguments:
|
||||
# $1 - pkgname [REQUIRED]
|
||||
# $2 - subpkg mode [REQUIRED]
|
||||
# $2 - cross target [OPTIONAL]
|
||||
|
||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
||||
|
@ -12,7 +13,8 @@ if [ $# -lt 1 -o $# -gt 2 ]; then
|
|||
fi
|
||||
|
||||
PKGNAME="$1"
|
||||
XBPS_CROSS_BUILD="$2"
|
||||
SUBPKG_MODE="$2"
|
||||
XBPS_CROSS_BUILD="$3"
|
||||
|
||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
||||
. $f
|
||||
|
@ -33,21 +35,21 @@ 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 ] || [ -f $XBPS_INSTALL_DONE -a -n "$XBPS_BUILD_FORCEMODE" ]; then
|
||||
mkdir -p $XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/$pkgname-$version
|
||||
if [ "$SUBPKG_MODE" = "no" ]; then
|
||||
if [ ! -f $XBPS_INSTALL_DONE ] || [ -f $XBPS_INSTALL_DONE -a -n "$XBPS_BUILD_FORCEMODE" ]; then
|
||||
mkdir -p $XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/$pkgname-$version
|
||||
|
||||
run_pkg_hooks pre-install
|
||||
run_pkg_hooks pre-install
|
||||
|
||||
# Run pre_install()
|
||||
if [ ! -f $XBPS_PRE_INSTALL_DONE ]; then
|
||||
if declare -f pre_install >/dev/null; then
|
||||
run_func pre_install
|
||||
touch -f $XBPS_PRE_INSTALL_DONE
|
||||
# Run pre_install()
|
||||
if [ ! -f $XBPS_PRE_INSTALL_DONE ]; then
|
||||
if declare -f pre_install >/dev/null; then
|
||||
run_func pre_install
|
||||
touch -f $XBPS_PRE_INSTALL_DONE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run do_install()
|
||||
if [ ! -f $XBPS_INSTALL_DONE ]; then
|
||||
# Run do_install()
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f do_install >/dev/null; then
|
||||
|
@ -60,15 +62,15 @@ if [ ! -f $XBPS_INSTALL_DONE ] || [ -f $XBPS_INSTALL_DONE -a -n "$XBPS_BUILD_FOR
|
|||
run_func do_install
|
||||
fi
|
||||
touch -f $XBPS_INSTALL_DONE
|
||||
fi
|
||||
|
||||
# Run post_install()
|
||||
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f post_install >/dev/null; then
|
||||
run_func post_install
|
||||
touch -f $XBPS_POST_INSTALL_DONE
|
||||
# Run post_install()
|
||||
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f post_install >/dev/null; then
|
||||
run_func post_install
|
||||
touch -f $XBPS_POST_INSTALL_DONE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue