xbps-src: -f <phase> now works for configure/build/install/pkg phases.
This commit is contained in:
parent
0450668a5e
commit
08efa2cca1
6 changed files with 15 additions and 15 deletions
|
@ -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_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"
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ fi
|
||||||
run_pkg_hooks pre-build
|
run_pkg_hooks pre-build
|
||||||
|
|
||||||
# Run 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
|
if declare -f pre_build >/dev/null; then
|
||||||
run_func pre_build
|
run_func pre_build
|
||||||
touch -f $XBPS_PRE_BUILD_DONE
|
touch -f $XBPS_PRE_BUILD_DONE
|
||||||
|
@ -65,7 +65,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Run post_build()
|
# 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
|
if declare -f post_build >/dev/null; then
|
||||||
run_func post_build
|
run_func post_build
|
||||||
touch -f $XBPS_POST_BUILD_DONE
|
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_PRECONFIGURE_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_pre_configure_done"
|
||||||
XBPS_POSTCONFIGURE_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_post_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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ fi
|
||||||
run_pkg_hooks pre-configure
|
run_pkg_hooks pre-configure
|
||||||
|
|
||||||
# Run 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
|
if declare -f pre_configure >/dev/null; then
|
||||||
run_func pre_configure
|
run_func pre_configure
|
||||||
touch -f $XBPS_PRECONFIGURE_DONE
|
touch -f $XBPS_PRECONFIGURE_DONE
|
||||||
|
@ -64,7 +64,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run post_configure()
|
# 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
|
if declare -f post_configure >/dev/null; then
|
||||||
run_func post_configure
|
run_func post_configure
|
||||||
touch -f $XBPS_POSTCONFIGURE_DONE
|
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"
|
cd $build_wrksrc || msg_error "$pkgver: cannot access to build_wrksrc [$build_wrksrc]\n"
|
||||||
fi
|
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
|
mkdir -p $XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/$pkgname-$version
|
||||||
|
|
||||||
run_pkg_hooks pre-install
|
run_pkg_hooks pre-install
|
||||||
|
|
||||||
# Run 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
|
if declare -f pre_install >/dev/null; then
|
||||||
run_func pre_install
|
run_func pre_install
|
||||||
touch -f $XBPS_PRE_INSTALL_DONE
|
touch -f $XBPS_PRE_INSTALL_DONE
|
||||||
|
@ -47,7 +47,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run do_install()
|
# Run do_install()
|
||||||
if [ ! -f $XBPS_INSTALL_DONE ]; then
|
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_INSTALL_DONE ]; then
|
||||||
cd "$wrksrc"
|
cd "$wrksrc"
|
||||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||||
if declare -f do_install >/dev/null; then
|
if declare -f do_install >/dev/null; then
|
||||||
|
@ -63,7 +63,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run post_install()
|
# Run post_install()
|
||||||
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
|
if [ -z "$XBPS_BUILD_FORCEMODE" -a ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||||
cd "$wrksrc"
|
cd "$wrksrc"
|
||||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||||
if declare -f post_install >/dev/null; then
|
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"
|
XBPS_SUBPKG_INSTALL_DONE="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_subpkg_install_done"
|
||||||
|
|
||||||
# If it's a subpkg execute the pkg_install() function.
|
# 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
|
if [ "$sourcepkg" != "$PKGNAME" ]; then
|
||||||
# Source all subpkg environment setup snippets.
|
# Source all subpkg environment setup snippets.
|
||||||
for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do
|
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"
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ fi
|
||||||
do_configure() {
|
do_configure() {
|
||||||
CFLAGS+=" -Wno-error=redundant-decls"
|
CFLAGS+=" -Wno-error=redundant-decls"
|
||||||
HAVE_VASPRINTF=1 ./configure --prefix=/usr --sysconfdir=/etc --enable-debug \
|
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() {
|
post_install() {
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
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,
|
-E If a binary package exists in a local repository for the target package,
|
||||||
do not try to build it, exit immediately.
|
do not try to build it, exit immediately.
|
||||||
|
|
||||||
-f Force building and registering binary packages into the local repository,
|
-f Force running the specified stage (configure/build/install/pkg)
|
||||||
even if same version is already registered.
|
even if it ran successfully.
|
||||||
|
|
||||||
-G Enable XBPS_USE_GIT_REVS (see etc/defaults.conf for more information).
|
-G Enable XBPS_USE_GIT_REVS (see etc/defaults.conf for more information).
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue