xbps-src: run pre-pkg hooks in the install to destdir target.
The prepare-32bit hook has been moved to the pre-pkg stage and now those hooks are executed as part of the install phase. That means that pre-pkg hooks are now independently run for the subpkgs and the sourcepkg after the install-destdir phase and pre/do/install hooks. As bonus, finally correct rdeps can now be collected for the 32bit pkgs and works for all them, without the need to sort the order of subpkgs!
This commit is contained in:
@@ -59,12 +59,14 @@ install_pkg() {
|
||||
$XBPS_LIBEXECDIR/xbps-src-dobuild.sh $sourcepkg $cross || exit 1
|
||||
[ "$target" = "build" ] && return 0
|
||||
|
||||
# Install sourcepkg into destdir.
|
||||
# Install pkgs into destdir.
|
||||
$FAKEROOT_CMD $XBPS_LIBEXECDIR/xbps-src-doinstall.sh $sourcepkg $cross || exit 1
|
||||
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
# Run subpkg pkg_install func.
|
||||
$FAKEROOT_CMD $XBPS_LIBEXECDIR/xbps-src-dopkg.sh $subpkg $cross || exit 1
|
||||
$FAKEROOT_CMD $XBPS_LIBEXECDIR/xbps-src-doinstall.sh $subpkg $cross || exit 1
|
||||
done
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$FAKEROOT_CMD $XBPS_LIBEXECDIR/xbps-src-prepkg.sh $subpkg $cross || exit 1
|
||||
done
|
||||
|
||||
if [ "$XBPS_TARGET_PKG" = "$sourcepkg" ]; then
|
||||
@@ -72,8 +74,8 @@ install_pkg() {
|
||||
fi
|
||||
|
||||
# If install went ok generate the binpkgs.
|
||||
for subpkg in ${sourcepkg} ${subpackages}; do
|
||||
$FAKEROOT_CMD $XBPS_LIBEXECDIR/xbps-src-genpkg.sh $subpkg "$XBPS_REPOSITORY" "$cross" || exit 1
|
||||
for subpkg in ${subpackages} ${sourcepkg}; do
|
||||
$FAKEROOT_CMD $XBPS_LIBEXECDIR/xbps-src-dopkg.sh $subpkg "$XBPS_REPOSITORY" "$cross" || exit 1
|
||||
done
|
||||
|
||||
# pkg cleanup
|
||||
|
Reference in New Issue
Block a user