xbps-src: -f <phase> now works for configure/build/install/pkg phases.
This commit is contained in:
parent
0450668a5e
commit
08efa2cca1
|
@ -28,7 +28,7 @@ XBPS_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_build_done"
|
|||
XBPS_PRE_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_pre_build_done"
|
||||
XBPS_POST_BUILD_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_post_build_done"
|
||||
|
||||
if [ -f "$XBPS_BUILD_DONE" ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a -f $XBPS_BUILD_DONE ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -41,7 +41,7 @@ fi
|
|||
run_pkg_hooks pre-build
|
||||
|
||||
# Run pre_build()
|
||||
if [ ! -f $XBPS_PRE_BUILD_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_PRE_BUILD_DONE ]; then
|
||||
if declare -f pre_build >/dev/null; then
|
||||
run_func pre_build
|
||||
touch -f $XBPS_PRE_BUILD_DONE
|
||||
|
@ -65,7 +65,7 @@ fi
|
|||
|
||||
|
||||
# Run post_build()
|
||||
if [ ! -f $XBPS_POST_BUILD_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_POST_BUILD_DONE ]; then
|
||||
if declare -f post_build >/dev/null; then
|
||||
run_func post_build
|
||||
touch -f $XBPS_POST_BUILD_DONE
|
||||
|
|
|
@ -28,7 +28,7 @@ XBPS_CONFIGURE_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_configure
|
|||
XBPS_PRECONFIGURE_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_pre_configure_done"
|
||||
XBPS_POSTCONFIGURE_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_post_configure_done"
|
||||
|
||||
if [ -f "$XBPS_CONFIGURE_DONE" ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a -f $XBPS_CONFIGURE_DONE ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -41,7 +41,7 @@ fi
|
|||
run_pkg_hooks pre-configure
|
||||
|
||||
# Run pre_configure()
|
||||
if [ ! -f $XBPS_PRECONFIGURE_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_PRECONFIGURE_DONE ]; then
|
||||
if declare -f pre_configure >/dev/null; then
|
||||
run_func pre_configure
|
||||
touch -f $XBPS_PRECONFIGURE_DONE
|
||||
|
@ -64,7 +64,7 @@ else
|
|||
fi
|
||||
|
||||
# Run post_configure()
|
||||
if [ ! -f $XBPS_POSTCONFIGURE_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_POSTCONFIGURE_DONE ]; then
|
||||
if declare -f post_configure >/dev/null; then
|
||||
run_func post_configure
|
||||
touch -f $XBPS_POSTCONFIGURE_DONE
|
||||
|
|
|
@ -33,13 +33,13 @@ 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
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_INSTALL_DONE ]; then
|
||||
mkdir -p $XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/$pkgname-$version
|
||||
|
||||
run_pkg_hooks pre-install
|
||||
|
||||
# Run pre_install()
|
||||
if [ ! -f $XBPS_PRE_INSTALL_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_PRE_INSTALL_DONE ]; then
|
||||
if declare -f pre_install >/dev/null; then
|
||||
run_func pre_install
|
||||
touch -f $XBPS_PRE_INSTALL_DONE
|
||||
|
@ -47,7 +47,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
|
|||
fi
|
||||
|
||||
# Run do_install()
|
||||
if [ ! -f $XBPS_INSTALL_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_INSTALL_DONE ]; then
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f do_install >/dev/null; then
|
||||
|
@ -63,7 +63,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
|
|||
fi
|
||||
|
||||
# Run post_install()
|
||||
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f post_install >/dev/null; then
|
||||
|
@ -77,7 +77,7 @@ fi
|
|||
XBPS_SUBPKG_INSTALL_DONE="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_subpkg_install_done"
|
||||
|
||||
# If it's a subpkg execute the pkg_install() function.
|
||||
if [ ! -f $XBPS_SUBPKG_INSTALL_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -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
|
||||
|
|
|
@ -27,7 +27,7 @@ done
|
|||
|
||||
XBPS_PREPKG_DONE="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_prepkg_done"
|
||||
|
||||
if [ -f $XBPS_PREPKG_DONE ]; then
|
||||
if [ -z "$XBPS_BUILD_FORCEMODE" -a -f $XBPS_PREPKG_DONE ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
do_configure() {
|
||||
CFLAGS+=" -Wno-error=redundant-decls"
|
||||
HAVE_VASPRINTF=1 ./configure --prefix=/usr --sysconfdir=/etc --enable-debug \
|
||||
--sbindir=/usr/bin ${CHROOT_READY:+--enable-tests}
|
||||
--bindir=/usr/bin ${CHROOT_READY:+--enable-tests}
|
||||
}
|
||||
post_install() {
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
|
|
4
xbps-src
4
xbps-src
|
@ -135,8 +135,8 @@ $(print_cross_targets)
|
|||
-E If a binary package exists in a local repository for the target package,
|
||||
do not try to build it, exit immediately.
|
||||
|
||||
-f Force building and registering binary packages into the local repository,
|
||||
even if same version is already registered.
|
||||
-f Force running the specified stage (configure/build/install/pkg)
|
||||
even if it ran successfully.
|
||||
|
||||
-G Enable XBPS_USE_GIT_REVS (see etc/defaults.conf for more information).
|
||||
|
||||
|
|
Loading…
Reference in New Issue