xbps-src: repair and improve the bootstrap target (from scratch).
- There's no need to install rdeps into the masterdir, just base-files. - There's no need to exit if XBPS_TARGET_PKG == sourcepkg, just return. - After building base-chroot, install bootstrap binary packages.
This commit is contained in:
parent
b019b5df6f
commit
e582f328b3
|
@ -479,16 +479,18 @@ _remove_pkg_cross_deps() {
|
||||||
remove_pkg_autodeps() {
|
remove_pkg_autodeps() {
|
||||||
local rval= tmplogf=
|
local rval= tmplogf=
|
||||||
|
|
||||||
[ -z "$CHROOT_READY" ] && return 0
|
|
||||||
|
|
||||||
cd $XBPS_MASTERDIR || return 1
|
cd $XBPS_MASTERDIR || return 1
|
||||||
msg_normal "${pkgver:-xbps-src}: removing autodeps, please wait...\n"
|
msg_normal "${pkgver:-xbps-src}: removing autodeps, please wait...\n"
|
||||||
tmplogf=$(mktemp)
|
tmplogf=$(mktemp)
|
||||||
|
|
||||||
_remove_pkg_cross_deps
|
if [ -z "$CHROOT_READY" ]; then
|
||||||
|
$FAKEROOT_CMD xbps-reconfigure -r $XBPS_MASTERDIR -a >> $tmplogf 2>&1
|
||||||
$FAKEROOT_CMD xbps-reconfigure -a >> $tmplogf 2>&1
|
$FAKEROOT_CMD xbps-remove -r $XBPS_MASTERDIR -Ryo >> $tmplogf 2>&1
|
||||||
$FAKEROOT_CMD xbps-remove -Ryo >> $tmplogf 2>&1
|
else
|
||||||
|
_remove_pkg_cross_deps
|
||||||
|
$FAKEROOT_CMD xbps-reconfigure -a >> $tmplogf 2>&1
|
||||||
|
$FAKEROOT_CMD xbps-remove -Ryo >> $tmplogf 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
msg_red "${pkgver:-xbps-src}: failed to remove autodeps:\n"
|
msg_red "${pkgver:-xbps-src}: failed to remove autodeps:\n"
|
||||||
|
|
|
@ -91,9 +91,10 @@ install_pkg() {
|
||||||
remove_pkg $cross
|
remove_pkg $cross
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If base-chroot not installed, install binpkg into masterdir
|
# If base-chroot not installed, install "base-files" into masterdir
|
||||||
# from local repository.
|
# from local repository; this is the only pkg required to be able to build
|
||||||
if [ -z "$CHROOT_READY" ]; then
|
# the bootstrap pkgs from scratch.
|
||||||
|
if [ -z "$CHROOT_READY" -a "$pkgname" = "base-files" ]; then
|
||||||
msg_normal "Installing $opkg into masterdir...\n"
|
msg_normal "Installing $opkg into masterdir...\n"
|
||||||
local _log=$(mktemp --tmpdir|| exit 1)
|
local _log=$(mktemp --tmpdir|| exit 1)
|
||||||
if [ -n "$XBPS_BUILD_FORCEMODE" ]; then
|
if [ -n "$XBPS_BUILD_FORCEMODE" ]; then
|
||||||
|
@ -113,7 +114,7 @@ install_pkg() {
|
||||||
# Package built successfully. Exit directly due to nested install_pkg
|
# Package built successfully. Exit directly due to nested install_pkg
|
||||||
# and install_pkg_deps functions.
|
# and install_pkg_deps functions.
|
||||||
remove_cross_pkg $cross
|
remove_cross_pkg $cross
|
||||||
exit 0
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
xbps-src
5
xbps-src
|
@ -248,6 +248,7 @@ install_bbotstrap() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys
|
mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys
|
||||||
|
cd $XBPS_MASTERDIR
|
||||||
cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys
|
cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys
|
||||||
${_bootstrap_arch} xbps-install -S --repository=${XBPS_REPOSITORY} \
|
${_bootstrap_arch} xbps-install -S --repository=${XBPS_REPOSITORY} \
|
||||||
${XBPS_INSTALL_ARGS} -c ${XBPS_HOSTDIR}/repocache \
|
${XBPS_INSTALL_ARGS} -c ${XBPS_HOSTDIR}/repocache \
|
||||||
|
@ -558,7 +559,9 @@ case "$XBPS_TARGET" in
|
||||||
fi
|
fi
|
||||||
setup_pkg $XBPS_TARGET_PKG
|
setup_pkg $XBPS_TARGET_PKG
|
||||||
install_pkg $XBPS_TARGET
|
install_pkg $XBPS_TARGET
|
||||||
rm -f ${bootstrap_vpkg}
|
[ -d $XBPS_MASTERDIR ] && rm -rf $XBPS_MASTERDIR
|
||||||
|
unset XBPS_TARGET_PKG
|
||||||
|
install_bbotstrap
|
||||||
;;
|
;;
|
||||||
bootstrap-update)
|
bootstrap-update)
|
||||||
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
||||||
|
|
Loading…
Reference in New Issue