xbps-src: cleanups for -E and -t.
-E also detect noarch binpkgs. -t make sure to cleanup the temporary masterdirs.
This commit is contained in:
parent
6e448362cb
commit
2f524cf66a
|
@ -34,6 +34,15 @@ error_func() {
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit_and_cleanup() {
|
||||||
|
local rval=$1
|
||||||
|
|
||||||
|
if [ -n "$XBPS_TEMP_MASTERDIR" ]; then
|
||||||
|
rm -rf "$XBPS_MASTERDIR"
|
||||||
|
fi
|
||||||
|
exit ${rval:=0}
|
||||||
|
}
|
||||||
|
|
||||||
msg_red() {
|
msg_red() {
|
||||||
# error messages in bold/red
|
# error messages in bold/red
|
||||||
[ -n "$NOCOLORS" ] || printf >&2 "\033[1m\033[31m"
|
[ -n "$NOCOLORS" ] || printf >&2 "\033[1m\033[31m"
|
||||||
|
@ -200,7 +209,7 @@ get_subpkgs() {
|
||||||
|
|
||||||
setup_pkg() {
|
setup_pkg() {
|
||||||
local pkg="$1" cross="$2"
|
local pkg="$1" cross="$2"
|
||||||
local val _vars f dbgflags
|
local val _vars f dbgflags _arch
|
||||||
|
|
||||||
[ -z "$pkg" ] && return 1
|
[ -z "$pkg" ] && return 1
|
||||||
|
|
||||||
|
@ -322,8 +331,13 @@ setup_pkg() {
|
||||||
makejobs="-j$XBPS_MAKEJOBS"
|
makejobs="-j$XBPS_MAKEJOBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$XBPS_BINPKG_EXISTS" -a -f "$XBPS_REPOSITORY/${pkgver}.${XBPS_TARGET_MACHINE}.xbps" ]; then
|
if [ -n "$noarch" ]; then
|
||||||
exit 0
|
_arch="noarch"
|
||||||
|
else
|
||||||
|
_arch="$XBPS_TARGET_MACHINE"
|
||||||
|
fi
|
||||||
|
if [ -n "$XBPS_BINPKG_EXISTS" -a -f "${XBPS_REPOSITORY}/${pkgver}.${_arch}.xbps" ]; then
|
||||||
|
exit_and_cleanup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$XBPS_DEBUG_PKGS" -o "$repository" = "nonfree" ]; then
|
if [ -z "$XBPS_DEBUG_PKGS" -o "$repository" = "nonfree" ]; then
|
||||||
|
|
|
@ -116,12 +116,11 @@ install_pkg() {
|
||||||
if [ "$XBPS_TARGET_PKG" = "$sourcepkg" ]; then
|
if [ "$XBPS_TARGET_PKG" = "$sourcepkg" ]; then
|
||||||
if [ "$XBPS_TARGET" = "bootstrap" ]; then
|
if [ "$XBPS_TARGET" = "bootstrap" ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
|
||||||
# Package built successfully. Exit directly due to nested install_pkg
|
|
||||||
# and install_pkg_deps functions.
|
|
||||||
remove_cross_pkg $cross
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
# Package built successfully. Exit directly due to nested install_pkg
|
||||||
|
# and install_pkg_deps functions.
|
||||||
|
remove_cross_pkg $cross
|
||||||
|
exit_and_cleanup
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue