xbps-src: multiple performance improvements.
- use xbps-checkvers(1) to resolve dependencies. - all dependencies are installed at once for the host and target. - the `show-build-deps` target is now much faster. - the `update-bulk/show-repo-updates` targets are now much faster. - the `update-sys/show-sys-updates` targets are now much faster. - the `bootstrap` target now works on musl hosts. - simplified some loops. - use cut(1) rather than awk(1) where applicable. - multiple random changes to improve performance. Based on work started by @Duncaen on https://github.com/void-linux/void-packages/pull/12433 Close https://github.com/void-linux/void-packages/pull/12433 Close https://github.com/void-linux/void-packages/pull/11282
This commit is contained in:
parent
7801a8cef8
commit
2a4e178e35
13 changed files with 401 additions and 602 deletions
|
@ -24,11 +24,12 @@ remove_pkg_cross_deps() {
|
|||
|
||||
prepare_cross_sysroot() {
|
||||
local cross="$1"
|
||||
local statefile="$XBPS_MASTERDIR/.xbps-${cross}-done"
|
||||
|
||||
[ -z "$cross" -o "$cross" = "" ] && return 0
|
||||
[ -z "$cross" -o "$cross" = "" -o -f $statefile ] && return 0
|
||||
|
||||
# Check for cross-vpkg-dummy available for the target arch, otherwise build it.
|
||||
pkg_available 'cross-vpkg-dummy>=0.30_1' $cross
|
||||
pkg_available 'cross-vpkg-dummy>=0.31_1' $cross
|
||||
if [ $? -eq 0 ]; then
|
||||
$XBPS_LIBEXECDIR/build.sh cross-vpkg-dummy cross-vpkg-dummy pkg $cross init || return $?
|
||||
fi
|
||||
|
@ -40,7 +41,7 @@ prepare_cross_sysroot() {
|
|||
errlog=$(mktemp) || exit 1
|
||||
$XBPS_INSTALL_XCMD -Syfd cross-vpkg-dummy &>$errlog
|
||||
rval=$?
|
||||
if [ $rval -ne 0 -a $rval -ne 17 ]; then
|
||||
if [ $rval -ne 0 ]; then
|
||||
msg_red "failed to install cross-vpkg-dummy (error $rval)\n"
|
||||
cat $errlog
|
||||
rm -f $errlog
|
||||
|
@ -48,11 +49,15 @@ prepare_cross_sysroot() {
|
|||
fi
|
||||
rm -f $errlog
|
||||
# Create top level symlinks in sysroot.
|
||||
XBPS_ARCH=$XBPS_TARGET_MACHINE xbps-reconfigure -r $XBPS_CROSS_BASE -f base-directories base-files &>/dev/null
|
||||
XBPS_ARCH=$XBPS_TARGET_MACHINE xbps-reconfigure -r $XBPS_CROSS_BASE -f base-files &>/dev/null
|
||||
# Create a sysroot/include and sysroot/lib symlink just in case.
|
||||
ln -s usr/include ${XBPS_CROSS_BASE}/include
|
||||
ln -s usr/lib ${XBPS_CROSS_BASE}/lib
|
||||
|
||||
install_cross_pkg $cross || return 1
|
||||
|
||||
touch -f $statefile
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue