Infrastructure changes to simplify the conf file.
* Removed the following vars from the conf file: XBPS_BUILDDIR, XBPS_PACKAGESDIR and XBPS_SRCDISTDIR. They are always relative to XBPS_MASTERDIR and cannot be changed. * Removed XBPS_INSTALLDIR, it was unused in the code. * Prepend /tools/bin in PATH for the chroot. * Don't register a repo in the chroot if the XBPS_PREFER_BINPKG_DEPS is not set. --HG-- extra : convert_revision : 4df03ffa64f0bbf81cd1dd0baf38f1b7e4f47549
This commit is contained in:
parent
7c38045a0f
commit
6673252679
6 changed files with 32 additions and 59 deletions
|
@ -31,8 +31,7 @@ HANDLER="$1"
|
|||
|
||||
. @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
|
||||
|
||||
EXTDIRS="xbps xbps_builddir xbps_packagesdir xbps_srcdistdir"
|
||||
REQFS="sys proc dev ${EXTDIRS}"
|
||||
REQFS="sys proc dev xbps"
|
||||
|
||||
mount_chroot_fs()
|
||||
{
|
||||
|
@ -46,9 +45,6 @@ mount_chroot_fs()
|
|||
fi
|
||||
case ${f} in
|
||||
xbps) blah=${XBPS_DISTRIBUTIONDIR};;
|
||||
xbps_builddir) blah=${XBPS_BUILDDIR};;
|
||||
xbps_srcdistdir) blah=${XBPS_SRCDISTDIR};;
|
||||
xbps_packagesdir) blah=${XBPS_PACKAGESDIR};;
|
||||
*) blah=/${f};;
|
||||
esac
|
||||
[ ! -d ${blah} ] && echo "failed." && continue
|
||||
|
@ -91,10 +87,8 @@ umount_chroot_fs()
|
|||
done
|
||||
|
||||
# Remove created dirs
|
||||
for dir in ${EXTDIRS}; do
|
||||
[ -f ${XBPS_MASTERDIR}/.${dir}_mount_bind_done ] && continue
|
||||
[ -d ${XBPS_MASTERDIR}/${dir} ] && rmdir ${XBPS_MASTERDIR}/${dir}
|
||||
done
|
||||
[ -f ${XBPS_MASTERDIR}/.xbps_mount_bind_done ] && continue
|
||||
[ -d ${XBPS_MASTERDIR}/xbps ] && rmdir ${XBPS_MASTERDIR}/xbps
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue