Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=35fc2df2cc1e2568792dfaa23e23ab9a28c5dcb5

commit 35fc2df2cc1e2568792dfaa23e23ab9a28c5dcb5
Author: crazy <[email protected]>
Date:   Tue Jan 30 19:31:39 2018 +0100

chroot_{mount,umount} check for ccache options

* do not always mount ccache dirs  , check first for options eg:
if [ "$NOCCACHE" = "0" -a -d /usr/lib/ccache/bin -a ! "`check_option NOCCACHE`" 
] ..
do_your_ccache_stuff
...

diff --git a/scripts/makepkg b/scripts/makepkg
index ac782be..ea22433 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -379,7 +379,9 @@ chroot_umount() {
umount $CHROOTDIR/sys >/dev/null
umount $CHROOTDIR/dev >/dev/null
umount $CHROOTDIR/var/cache/pacman-g2 >/dev/null
-    umount $CHROOTDIR/var/cache/ccache/$pkgname >/dev/null
+    if [ "$NOCCACHE" = "0" -a -d /usr/lib/ccache/bin -a ! "`check_option 
NOCCACHE`" ]; then
+       umount $CHROOTDIR/var/cache/ccache/$pkgname >/dev/null
+    fi
if [ "$?" != "0" ]; then
error "An error occurred while attempting to umount chroot directories."
exit 1
@@ -394,8 +396,10 @@ chroot_mount() {
mount -t devtmpfs none $CHROOTDIR/dev >/dev/null
mount -o bind /dev/shm $CHROOTDIR/dev/shm
mount -o bind /var/cache/pacman-g2 $CHROOTDIR/var/cache/pacman-g2 >/dev/null
-    mount -o bind $CCACHE_BASEDIR/$pkgname \
-    $CHROOTDIR/var/cache/ccache/$pkgname >/dev/null
+    if [ "$NOCCACHE" = "0" -a -d /usr/lib/ccache/bin -a ! "`check_option 
NOCCACHE`" ]; then
+       mount -o bind $CCACHE_BASEDIR/$pkgname \
+       $CHROOTDIR/var/cache/ccache/$pkgname >/dev/null
+    fi
if [ "$?" != "0" ]; then
error "An error occurred while attempting to mount chroot directories."
exit 1
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to