From b48ab815479c1301bbd696978c1dd537a03c68d3 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Mon, 14 Feb 2011 15:37:06 -0300 Subject: Share pacman cache --- libremakepkg | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libremakepkg') diff --git a/libremakepkg b/libremakepkg index 2055002..a41326f 100755 --- a/libremakepkg +++ b/libremakepkg @@ -28,6 +28,8 @@ source /etc/libretools.conf echo "Updating the main chroot" mkarchroot -u -c ${CACHEDIR} -- ${CHROOTDIR}/${CHROOT} +mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHCOPY}/var/cache/pacman/pkg || exit 1 + echo "Creating the package" makechrootpkg -c -r ${CHROOTDIR} -l ${CHCOPY} -- $@ -- cgit v1.2.3-54-g00ecf From 0f3c3b4fcaac15db0df82679fd81518bee4e2ea2 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Thu, 10 Mar 2011 16:02:50 -0300 Subject: LibreMakepkg doesn't clean the chroot copy if any arg is supplied --- libremakepkg | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libremakepkg') diff --git a/libremakepkg b/libremakepkg index a41326f..cf3f13f 100755 --- a/libremakepkg +++ b/libremakepkg @@ -25,12 +25,17 @@ fi source /etc/libretools.conf -echo "Updating the main chroot" -mkarchroot -u -c ${CACHEDIR} -- ${CHROOTDIR}/${CHROOT} +[[ -z $1 ]] && { + CLEAN="-c" -mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHCOPY}/var/cache/pacman/pkg || exit 1 + echo "Updating the main chroot" + mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHROOT}/var/cache/pacman/pkg || exit 1 + mkarchroot -u -- ${CHROOTDIR}/${CHROOT} + + mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHCOPY}/var/cache/pacman/pkg || exit 1 +} echo "Creating the package" -makechrootpkg -c -r ${CHROOTDIR} -l ${CHCOPY} -- $@ +makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${CHCOPY} -- $@ exit 0 -- cgit v1.2.3-54-g00ecf