summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibremakepkg12
-rwxr-xr-xlibrerepkg4
2 files changed, 8 insertions, 8 deletions
diff --git a/libremakepkg b/libremakepkg
index 6b996dc..ef276f3 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -39,13 +39,15 @@ usage() {
}
CLEAN=""
+CLEAN_CACHE=""
update_first=0
chrootname=${CHCOPY}
-while getopts 'hcun' arg; do
+while getopts 'hcCun' arg; do
case "${arg}" in
h) usage ;;
c) CLEAN="-c" ;;
+ C) CLEAN_CACHE="-C"
u) update_first=1 ;;
n) chrootname="$OPTARG" ;;
*) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;;
@@ -62,17 +64,15 @@ pkgbuild-check-nonfree ||{
fi
}
-mount -o bind ${CACHEDIR} \
- ${CHROOTDIR}/${chrootname}/var/cache/pacman/pkg || exit 1
-
if [ $update_first -eq 1 ]; then
msg "Updating the main chroot"
- mkarchroot $CLEAN ${CACHEDIR} -u -- ${CHROOTDIR}/${CHROOT}
+ # -c option in mkarchroot indicates cache
+ mkarchroot -c ${CACHEDIR} -u -- ${CHROOTDIR}/${CHROOT}
fi
msg "Creating the package"
-makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${chrootname} -- $MAKEPKG_ARGS
+makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${chrootname} -- $CLEAN_CACHE $MAKEPKG_ARGS
umount ${CHROOTDIR}/${chrootname}/var/cache/pacman/pkg
diff --git a/librerepkg b/librerepkg
index 08451bd..0a38e00 100755
--- a/librerepkg
+++ b/librerepkg
@@ -48,5 +48,5 @@ mv rePKGBUILD PKGBUILD
msg2 "Updating md5sums"
makepkg -g >> PKGBUILD
msg "Repackaging using libremakepkg"
-sudo libremakepkg -cu
-
+sudo libremakepkg -cu -L
+stdnull "popd ${tempdir}"