Copy makepkg.conf and ~/.makepkg.conf into chroot.
This change allows all packager-defined settings (such as PACKAGER or OPTIONS) to propogate into the chroot when building packages. Signed-off-by: Travis Willard <travis@archlinux.org> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
113f51fbc0
commit
9e627e219e
|
@ -102,15 +102,20 @@ trap 'cleanup' 0 1 2 15
|
||||||
echo "moving build files to chroot"
|
echo "moving build files to chroot"
|
||||||
[ -d "$uniondir/build" ] || mkdir "$uniondir/build"
|
[ -d "$uniondir/build" ] || mkdir "$uniondir/build"
|
||||||
|
|
||||||
# Source makepkg.conf and ~/makepkg.conf
|
# Copy makepkg.conf and ~/.makepkg.conf into the chroot so packager has
|
||||||
|
# all their custom variables set.
|
||||||
if [ -r "/etc/makepkg.conf" ]; then
|
if [ -r "/etc/makepkg.conf" ]; then
|
||||||
source "/etc/makepkg.conf"
|
rm $uniondir/etc/makepkg.conf
|
||||||
|
cp /etc/makepkg.conf $uniondir/etc/makepkg.conf
|
||||||
fi
|
fi
|
||||||
if [ -r ~/.makepkg.conf ]; then
|
if [ -r ~/.makepkg.conf ]; then
|
||||||
source ~/.makepkg.conf
|
cat ~/.makepkg.conf >> $uniondir/etc/makepkg.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up src and pkg dirs
|
source $uniondir/etc/makepkg.conf
|
||||||
|
|
||||||
|
# Magic trickery with PKGDEST and SRCDEST, so that the built
|
||||||
|
# files end up where they're expected in the _real_ filesystem
|
||||||
[ -d "$uniondir/srcdest" ] || mkdir "$uniondir/srcdest"
|
[ -d "$uniondir/srcdest" ] || mkdir "$uniondir/srcdest"
|
||||||
[ -d "$uniondir/pkgdest" ] || mkdir "$uniondir/pkgdest"
|
[ -d "$uniondir/pkgdest" ] || mkdir "$uniondir/pkgdest"
|
||||||
[ ! -z "$PKGDEST" ] && mount --bind "$PKGDEST" "$uniondir/pkgdest"
|
[ ! -z "$PKGDEST" ] && mount --bind "$PKGDEST" "$uniondir/pkgdest"
|
||||||
|
|
Loading…
Reference in New Issue