Minor fixes to archlinux build

This commit is contained in:
Marek Marczykowski-Górecki 2013-12-08 20:33:28 +01:00
parent ccc44fe093
commit 1e9b01d317
2 changed files with 5 additions and 2 deletions

View File

@ -34,8 +34,11 @@ if [ "$VERBOSE" == "1" ]; then
fi fi
function cleanup() { function cleanup() {
if grep -q " $PWD/mnt/proc " /proc/mounts; then
umount mnt/proc
fi
if grep -q " $PWD/mnt " /proc/mounts; then if grep -q " $PWD/mnt " /proc/mounts; then
umount mnt/proc mnt umount mnt
fi fi
} }

View File

@ -7,7 +7,7 @@ mount $CACHEDIR/root-image.fs mnt_archlinux_dvd
echo "--> Starting cleanup actions" echo "--> Starting cleanup actions"
# Remove unused packages and their dependencies (make dependencies) # Remove unused packages and their dependencies (make dependencies)
cleanuppkgs=`./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman -Qdt | cut -d " " -f 1` cleanuppkgs=`./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman -Qdt | grep -v kernel | cut -d " " -f 1`
echo "--> Packages that can be cleaned up: $cleanuppkgs" echo "--> Packages that can be cleaned up: $cleanuppkgs"
if [ -n "$cleanuppkgs" ] ; then if [ -n "$cleanuppkgs" ] ; then
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc $cleanuppkgs ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc $cleanuppkgs