commit:     3767128cf08a0a21559eb9c41ba393dcabc6f087
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 27 22:36:45 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 15 13:43:16 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=3767128c

Print WORKDIR & D sizes in build logs

Acked-by: Alexander Berntsen <bernalex <AT> gentoo.org>

 bin/phase-functions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 0b853bf..6a47fed 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -593,6 +593,15 @@ __dyn_install() {
        __vecho
        __ebuild_phase post_src_install
 
+       # record build & installed size in build log
+       if type -P du &>/dev/null; then
+               local sz=( $(du -ks "${WORKDIR}") )
+               einfo "Final size of build directory: ${sz[0]} KiB"
+               sz=( $(du -ks "${D}") )
+               einfo "Final size of installed tree: ${sz[0]} KiB"
+               __vecho
+       fi
+
        cd "${PORTAGE_BUILDDIR}"/build-info
        set -f
        local f x

Reply via email to