xbps-src: take into account XBPS_ALT_REPOSITORY if set.
otherwise it won't be used while installing bootstrap pkgs.
This commit is contained in:
parent
fab6617758
commit
343448a186
1 changed files with 30 additions and 26 deletions
56
xbps-src
56
xbps-src
|
@ -250,9 +250,6 @@ check_config_vars() {
|
||||||
check_build_requirements() {
|
check_build_requirements() {
|
||||||
local found
|
local found
|
||||||
|
|
||||||
for f in $XBPS_SHUTILSDIR/*.sh; do
|
|
||||||
[ -r $f ] && . $f
|
|
||||||
done
|
|
||||||
case "$XBPS_TARGET" in
|
case "$XBPS_TARGET" in
|
||||||
*bootstrap*) found=1;;
|
*bootstrap*) found=1;;
|
||||||
*) ;;
|
*) ;;
|
||||||
|
@ -265,29 +262,6 @@ check_build_requirements() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Set XBPS_REPOSITORY to our current branch.
|
|
||||||
if [ -z "$XBPS_ALT_REPOSITORY" ]; then
|
|
||||||
pushd "$PWD" &>/dev/null
|
|
||||||
cd $XBPS_DISTDIR
|
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
|
||||||
_gitbranch="$(chroot-git symbolic-ref --short HEAD 2>/dev/null)"
|
|
||||||
else
|
|
||||||
_gitbranch="$($XBPS_GIT_CMD symbolic-ref --short HEAD 2>/dev/null)"
|
|
||||||
fi
|
|
||||||
if [ -n "${_gitbranch}" -a "${_gitbranch}" != "master" ]; then
|
|
||||||
export XBPS_ALT_REPOSITORY="${_gitbranch}"
|
|
||||||
export XBPS_REPOSITORY="${XBPS_REPOSITORY}/${_gitbranch}"
|
|
||||||
if [ -z "$IN_CHROOT" ]; then
|
|
||||||
msg_normal "Using \`$XBPS_REPOSITORY\' as local repository.\n"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
popd &>/dev/null
|
|
||||||
else
|
|
||||||
export XBPS_REPOSITORY="${XBPS_REPOSITORY}/${XBPS_ALT_REPOSITORY}"
|
|
||||||
if [ -z "$IN_CHROOT" ]; then
|
|
||||||
msg_normal "Using \`$XBPS_REPOSITORY\' as local repository.\n"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_bbootstrap() {
|
install_bbootstrap() {
|
||||||
|
@ -519,6 +493,10 @@ fi
|
||||||
#
|
#
|
||||||
check_config_vars
|
check_config_vars
|
||||||
|
|
||||||
|
for f in $XBPS_DISTDIR/common/xbps-src/shutils/*.sh; do
|
||||||
|
[ -r $f ] && . $f
|
||||||
|
done
|
||||||
|
|
||||||
if [ -n "$XBPS_HOSTDIR" ]; then
|
if [ -n "$XBPS_HOSTDIR" ]; then
|
||||||
export XBPS_REPOSITORY=$XBPS_HOSTDIR/binpkgs
|
export XBPS_REPOSITORY=$XBPS_HOSTDIR/binpkgs
|
||||||
readonly XBPS_SRCDISTDIR=$XBPS_HOSTDIR/sources
|
readonly XBPS_SRCDISTDIR=$XBPS_HOSTDIR/sources
|
||||||
|
@ -526,6 +504,31 @@ else
|
||||||
export XBPS_REPOSITORY=$XBPS_MASTERDIR/host/binpkgs
|
export XBPS_REPOSITORY=$XBPS_MASTERDIR/host/binpkgs
|
||||||
readonly XBPS_SRCDISTDIR=$XBPS_MASTERDIR/host/sources
|
readonly XBPS_SRCDISTDIR=$XBPS_MASTERDIR/host/sources
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set XBPS_REPOSITORY to our current branch.
|
||||||
|
if [ -z "$XBPS_ALT_REPOSITORY" ]; then
|
||||||
|
pushd "$PWD" &>/dev/null
|
||||||
|
cd $XBPS_DISTDIR
|
||||||
|
if [ -n "$IN_CHROOT" ]; then
|
||||||
|
_gitbranch="$(chroot-git symbolic-ref --short HEAD 2>/dev/null)"
|
||||||
|
else
|
||||||
|
_gitbranch="$($XBPS_GIT_CMD symbolic-ref --short HEAD 2>/dev/null)"
|
||||||
|
fi
|
||||||
|
if [ -n "${_gitbranch}" -a "${_gitbranch}" != "master" ]; then
|
||||||
|
export XBPS_ALT_REPOSITORY="${_gitbranch}"
|
||||||
|
export XBPS_REPOSITORY="${XBPS_REPOSITORY}/${_gitbranch}"
|
||||||
|
if [ -z "$IN_CHROOT" ]; then
|
||||||
|
msg_normal "Using \`$XBPS_REPOSITORY\' as local repository.\n"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
popd &>/dev/null
|
||||||
|
else
|
||||||
|
export XBPS_REPOSITORY="${XBPS_REPOSITORY}/${XBPS_ALT_REPOSITORY}"
|
||||||
|
if [ -z "$IN_CHROOT" ]; then
|
||||||
|
msg_normal "Using \`$XBPS_REPOSITORY\' as local repository.\n"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
if [ -n "$IN_CHROOT" ]; then
|
||||||
readonly XBPS_UHELPER_CMD="xbps-uhelper"
|
readonly XBPS_UHELPER_CMD="xbps-uhelper"
|
||||||
readonly XBPS_INSTALL_CMD="xbps-install"
|
readonly XBPS_INSTALL_CMD="xbps-install"
|
||||||
|
@ -602,6 +605,7 @@ if [ -z "$XBPS_TARGET_MACHINE" ]; then
|
||||||
export XBPS_TARGET_MACHINE=${XBPS_ARCH:=$XBPS_MACHINE}
|
export XBPS_TARGET_MACHINE=${XBPS_ARCH:=$XBPS_MACHINE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
|
export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
|
||||||
XBPS_SRCPKGDIR XBPS_COMMONDIR XBPS_BUILDDIR XBPS_REPO_DELTAS \
|
XBPS_SRCPKGDIR XBPS_COMMONDIR XBPS_BUILDDIR XBPS_REPO_DELTAS \
|
||||||
XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_SRCDISTDIR XBPS_DIGEST_CMD \
|
XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_SRCDISTDIR XBPS_DIGEST_CMD \
|
||||||
|
|
Loading…
Add table
Reference in a new issue