xbps-src: use xbps-0.37 config repo dir feature (etc/repo.d).
This commit is contained in:
parent
ff7d20ee21
commit
cf76c65be9
1 changed files with 8 additions and 10 deletions
|
@ -57,14 +57,14 @@ _EOF
|
||||||
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
|
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
|
||||||
|
|
||||||
# Update xbps alternative repository if set.
|
# Update xbps alternative repository if set.
|
||||||
mkdir -p $XBPS_MASTERDIR/etc/xbps/repos
|
mkdir -p $XBPS_MASTERDIR/etc/xbps/repo.d
|
||||||
if [ -n "$XBPS_ALT_REPOSITORY" ]; then
|
if [ -n "$XBPS_ALT_REPOSITORY" ]; then
|
||||||
( \
|
( \
|
||||||
echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}"; \
|
echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}"; \
|
||||||
echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}/nonfree"; \
|
echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}/nonfree"; \
|
||||||
) > $XBPS_MASTERDIR/etc/xbps/repos/alternative.conf
|
) > $XBPS_MASTERDIR/etc/xbps/repo.d/00-alternative.conf
|
||||||
else
|
else
|
||||||
: > $XBPS_MASTERDIR/etc/xbps/repos/alternative.conf
|
rm -f $XBPS_MASTERDIR/etc/xbps/repo.d/00-alternative.conf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,8 @@ chroot_prepare() {
|
||||||
# Copy /etc/hosts from base-files.
|
# Copy /etc/hosts from base-files.
|
||||||
cp -f $XBPS_SRCPKGDIR/base-files/files/hosts $XBPS_MASTERDIR/etc
|
cp -f $XBPS_SRCPKGDIR/base-files/files/hosts $XBPS_MASTERDIR/etc
|
||||||
|
|
||||||
rm -f $XBPS_MASTERDIR/etc/xbps/xbps.conf
|
echo "syslog=false" >> $XBPS_MASTERDIR/etc/xbps/xbps.conf
|
||||||
|
rm -f $XBPS_MASTERDIR/usr/share/xbps/repo.d/*.conf
|
||||||
|
|
||||||
# Prepare default locale: en_US.UTF-8.
|
# Prepare default locale: en_US.UTF-8.
|
||||||
if [ -s ${XBPS_MASTERDIR}/etc/default/libc-locales ]; then
|
if [ -s ${XBPS_MASTERDIR}/etc/default/libc-locales ]; then
|
||||||
|
@ -118,17 +119,14 @@ chroot_sync_repos() {
|
||||||
${XBPS_MASTERDIR}/etc/xbps/xbps.conf
|
${XBPS_MASTERDIR}/etc/xbps/xbps.conf
|
||||||
fi
|
fi
|
||||||
install -Dm644 ${XBPS_COMMONDIR}/xbps-src/chroot/repos-local.conf \
|
install -Dm644 ${XBPS_COMMONDIR}/xbps-src/chroot/repos-local.conf \
|
||||||
${XBPS_MASTERDIR}/etc/xbps/repos/local.conf
|
${XBPS_MASTERDIR}/etc/xbps/repo.d/10-local.conf
|
||||||
install -Dm644 ${XBPS_COMMONDIR}/xbps-src/chroot/repos-remote.conf \
|
install -Dm644 ${XBPS_COMMONDIR}/xbps-src/chroot/repos-remote.conf \
|
||||||
${XBPS_MASTERDIR}/etc/xbps/repos/remote.conf
|
${XBPS_MASTERDIR}/etc/xbps/repo.d/20-remote.conf
|
||||||
|
|
||||||
# if -N is set, comment out remote repositories from xbps.conf.
|
# if -N is set, comment out remote repositories from xbps.conf.
|
||||||
if [ -n "$XBPS_SKIP_REMOTEREPOS" ]; then
|
if [ -n "$XBPS_SKIP_REMOTEREPOS" ]; then
|
||||||
sed -e 's,^.*\(include=/etc/xbps/repos/remote.conf$\),#\1,' \
|
rm -f ${XBPS_MASTERDIR}/etc/xbps/repo.d/20-remote.conf
|
||||||
-i ${XBPS_MASTERDIR}/etc/xbps/xbps.conf
|
|
||||||
else
|
else
|
||||||
sed -e 's,^#.*\(include=/etc/xbps/repos/remote.conf$\),\1,' \
|
|
||||||
-i ${XBPS_MASTERDIR}/etc/xbps/xbps.conf
|
|
||||||
# Make sure to sync index for remote repositories.
|
# Make sure to sync index for remote repositories.
|
||||||
$CHROOT_CMD $XBPS_MASTERDIR /usr/sbin/xbps-install -S
|
$CHROOT_CMD $XBPS_MASTERDIR /usr/sbin/xbps-install -S
|
||||||
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
||||||
|
|
Loading…
Reference in a new issue