[Frugalware-git] pacman-g2: makepkg: improve chroot size logging

Miklos Vajna vmiklos at frugalware.org
Thu Jan 21 01:50:12 CET 2010


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

commit a09d444e59403fc9a5cc78be0300062114126547
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Thu Jan 21 01:48:51 2010 +0100

makepkg: improve chroot size logging

- do it before the build home dir is cleaned up, so that we'll see the
working dir size and it'll be really logged

diff --git a/scripts/makepkg b/scripts/makepkg
index f0be5c7..c1ad621 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -432,7 +432,6 @@ chroot_clean()
$ECHO $CHROOTDIR |grep -q $TREE$ || CHROOTDIR="$CHROOTDIR/$TREE"
if [ -d "$CHROOTDIR" ]; then
chroot_lock
-			msg "Chroot size before cleaning: $(du -sh $CHROOTDIR |sed "s/\t.*//")"
msg "Removing unnecessary packages."
for i in "$COREPKGS"
do
@@ -1775,6 +1774,11 @@ fi

cd $startdir
if [ "$CLEANUP" = "1" ]; then
+	if [ "$INCHROOT" == "1" ]; then
+		exclude="--exclude=/proc --exclude=/sys --exclude=/dev"
+		exclude="$exclude --exclude=/var/cache/pacman-g2 --exclude=/var/cache/ccache/$pkgname"
+		msg "Chroot size before cleaning: $(sudo du -sh $exclude / |sed "s/\t.*//")"
+	fi
msg "Cleaning up..."
rm -rf src pkg pkg.* Changelog
fi


More information about the Frugalware-git mailing list