xbps-src: fix remaining issues with -N and -a.
This commit is contained in:
parent
f51cc018e8
commit
a86b30ba05
|
@ -29,10 +29,9 @@ show_pkg_build_options
|
|||
check_pkg_arch $XBPS_CROSS_BUILD
|
||||
|
||||
if [ -z "$XBPS_CROSS_PREPARE" ]; then
|
||||
install_cross_pkg $XBPS_CROSS_BUILD || exit $?
|
||||
prepare_cross_sysroot $XBPS_CROSS_BUILD || exit $?
|
||||
install_cross_pkg $XBPS_CROSS_BUILD
|
||||
prepare_cross_sysroot $XBPS_CROSS_BUILD
|
||||
fi
|
||||
|
||||
# Install dependencies from binary packages
|
||||
if [ "$PKGNAME" != "$TARGET_PKG" -o -z "$XBPS_SKIP_DEPS" ]; then
|
||||
install_pkg_deps $PKGNAME $TARGET_PKG pkg $XBPS_CROSS_BUILD $XBPS_CROSS_PREPARE || exit $?
|
||||
|
|
|
@ -136,11 +136,11 @@ chroot_sync_repos() {
|
|||
|
||||
# Copy host repos to the cross root.
|
||||
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
||||
rm -rf $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps.d
|
||||
mkdir -p $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps.d
|
||||
rm -rf $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
||||
mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
||||
cp ${XBPS_MASTERDIR}/etc/xbps.d/*.conf \
|
||||
$XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps.d
|
||||
rm -f $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/etc/xbps.d/*-x86_64.conf
|
||||
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
||||
rm -f $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d/*-x86_64.conf
|
||||
fi
|
||||
|
||||
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
|
||||
|
@ -154,19 +154,19 @@ chroot_sync_repos() {
|
|||
|
||||
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
||||
# Copy host keys to the target rootdir.
|
||||
if [ ! -d $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/var/db/xbps/keys ]; then
|
||||
mkdir -p $XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/var/db/xbps/keys
|
||||
fi
|
||||
mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
||||
cp -a $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
|
||||
$XBPS_MASTERDIR/usr/$XBPS_CROSS_TRIPLET/var/db/xbps/keys
|
||||
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
||||
# Make sure to sync index for remote repositories.
|
||||
env XBPS_TARGET_ARCH=$XBPS_TARGET_ARCH \
|
||||
xbps-uunshare $XBPS_MASTERDIR /usr/sbin/xbps-install \
|
||||
-r /usr/$XBPS_CROSS_TRIPLET -S
|
||||
if [ $? -eq 99 ]; then
|
||||
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
|
||||
env XBPS_TARGET_ARCH=$XBPS_TARGET_ARCH \
|
||||
xbps-uchroot $XBPS_MASTERDIR /usr/sbin/xbps-install \
|
||||
-r /usr/$XBPS_CROSS_TRIPLET -S
|
||||
xbps-uunshare $XBPS_MASTERDIR /usr/sbin/xbps-install \
|
||||
-r $XBPS_CROSS_BASE -S
|
||||
if [ $? -eq 99 ]; then
|
||||
env XBPS_TARGET_ARCH=$XBPS_TARGET_ARCH \
|
||||
xbps-uchroot $XBPS_MASTERDIR /usr/sbin/xbps-install \
|
||||
-r $XBPS_CROSS_BASE -S
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -27,12 +27,6 @@ prepare_cross_sysroot() {
|
|||
|
||||
[ -z "$cross" -o "$cross" = "" ] && return 0
|
||||
|
||||
if [ ! -d ${XBPS_CROSS_BASE}/var/db/xbps/keys ]; then
|
||||
mkdir -p ${XBPS_CROSS_BASE}/var/db/xbps/keys
|
||||
cp ${XBPS_MASTERDIR}/var/db/xbps/keys/*.plist \
|
||||
${XBPS_CROSS_BASE}/var/db/xbps/keys
|
||||
fi
|
||||
|
||||
# Check for cross-vpkg-dummy available for the target arch, otherwise build it.
|
||||
pkg_available cross-vpkg-dummy $cross
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -41,7 +35,7 @@ prepare_cross_sysroot() {
|
|||
|
||||
errlog=$(mktemp)
|
||||
msg_normal "Installing $cross cross pkg: cross-vpkg-dummy ...\n"
|
||||
$XBPS_INSTALL_XCMD -r $XBPS_CROSS_BASE -SAyd cross-vpkg-dummy &>$errlog
|
||||
$XBPS_INSTALL_XCMD -SAyd cross-vpkg-dummy &>$errlog
|
||||
rval=$?
|
||||
if [ $rval -ne 0 -a $rval -ne 17 ]; then
|
||||
msg_red "failed to install cross-vpkg-dummy (error $rval)\n"
|
||||
|
@ -60,13 +54,13 @@ install_cross_pkg() {
|
|||
[ -z "$cross" -o "$cross" = "" ] && return 0
|
||||
|
||||
# Check if the cross compiler pkg is available in repos, otherwise build it.
|
||||
msg_normal "Installing $cross cross compiler: cross-${XBPS_CROSS_TRIPLET} ...\n"
|
||||
pkg_available cross-${XBPS_CROSS_TRIPLET}
|
||||
rval=$?
|
||||
if [ $rval -eq 0 ]; then
|
||||
$XBPS_LIBEXECDIR/build.sh cross-${XBPS_CROSS_TRIPLET} cross-${XBPS_CROSS_TRIPLET} pkg || return $rval
|
||||
fi
|
||||
|
||||
msg_normal "Installing $cross cross compiler: cross-${XBPS_CROSS_TRIPLET} ...\n"
|
||||
errlog=$(mktemp)
|
||||
$XBPS_INSTALL_CMD -Syd cross-${XBPS_CROSS_TRIPLET} &>$errlog
|
||||
rval=$?
|
||||
|
|
Loading…
Reference in New Issue