summaryrefslogtreecommitdiffstats
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorMarkus M. May <mmay@javafreedom.org>2013-11-06 18:56:50 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-11-07 14:56:11 +0100
commitfd1be1b27a4b9639f16cddfc9720d6efcfbba909 (patch)
treed2ed98d0a90909a518d6495273c7afbb692fe549 /makechrootpkg.in
parent8ce6e29add2d6bf40df302a24a17ccad15875c08 (diff)
downloaddevtools-fd1be1b27a4b9639f16cddfc9720d6efcfbba909.tar.gz
devtools-fd1be1b27a4b9639f16cddfc9720d6efcfbba909.tar.xz
FS#37656 - [devtools] add SRCPKGDEST to makechrootpkg
Signed-off-by: Markus M. May <mmay@javafreedom.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in21
1 files changed, 16 insertions, 5 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index f5238a4..d03b703 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -125,7 +125,7 @@ load_vars() {
[[ -f $makepkg_conf ]] || return 1
- for var in {SRC,PKG,LOG}DEST MAKEFLAGS PACKAGER; do
+ for var in {SRC,SRCPKG,PKG,LOG}DEST MAKEFLAGS PACKAGER; do
[[ -z ${!var} ]] && eval $(grep "^${var}=" "$makepkg_conf")
done
@@ -214,6 +214,11 @@ prepare_chroot() {
echo 'PKGDEST="/pkgdest"' >> "$copydir/etc/makepkg.conf"
fi
+ mkdir -p "$copydir/srcpkgdest"
+ if ! grep -q 'SRCPKGDEST="/srcpkgdest"' "$copydir/etc/makepkg.conf"; then
+ echo 'SRCPKGDEST="/srcpkgdest"' >> "$copydir/etc/makepkg.conf"
+ fi
+
mkdir -p "$copydir/logdest"
if ! grep -q 'LOGDEST="/logdest"' "$copydir/etc/makepkg.conf"; then
echo 'LOGDEST="/logdest"' >> "$copydir/etc/makepkg.conf"
@@ -227,7 +232,7 @@ prepare_chroot() {
echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf"
fi
- chown -R nobody "$copydir"/{build,pkgdest,logdest,srcdest,startdir}
+ chown -R nobody "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir}
if [[ -n $MAKEFLAGS ]]; then
sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf"
@@ -337,6 +342,11 @@ move_products() {
chown "$src_owner" "$l"
mv "$l" "$LOGDEST"
done
+
+ for s in "$copydir"/srcpkgdest/*; do
+ chown "$src_owner" "$s"
+ mv "$s" "$SRCPKGDEST"
+ done
}
# }}}
@@ -346,9 +356,10 @@ load_vars "$USER_HOME/.makepkg.conf"
load_vars /etc/makepkg.conf
# Use PKGBUILD directory if these don't exist
-[[ -d $PKGDEST ]] || PKGDEST=$PWD
-[[ -d $SRCDEST ]] || SRCDEST=$PWD
-[[ -d $LOGDEST ]] || LOGDEST=$PWD
+[[ -d $PKGDEST ]] || PKGDEST=$PWD
+[[ -d $SRCDEST ]] || SRCDEST=$PWD
+[[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD
+[[ -d $LOGDEST ]] || LOGDEST=$PWD
create_chroot