The working directory and instal directory sizes are reported before the strip and the man/info/doc compress phases, thus does not match the actual install size of the package Reproducible: Always Steps to Reproduce: 1. merge any package containing binaries and/or man/info pages and/or documentation. As an example, re-merge sys-apps/portage itself: # ebuild /usr/portage/sys-apps/portage/portage-2.2.28.ebuild install 2. Compare the reported install size with the actual install directory size: # du -ks /home/var_tmp/portage/sys-apps/portage-2.2.28/image/ Actual Results: # ebuild /usr/portage/sys-apps/portage/portage-2.2.28.ebuild install [...] >>> Completed installing portage-2.2.28 into /home/var_tmp/portage/sys-apps/portage-2.2.28/image/ * Final size of build directory: 19980 KiB * Final size of installed tree: 31396 KiB strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version ecompressdir: bzip2 -9 /usr/share/doc ecompressdir: bzip2 -9 /usr/share/man # du -ks /home/var_tmp/portage/sys-apps/portage-2.2.28/image/ 31172 /home/var_tmp/portage/sys-apps/portage-2.2.28/image/ Expected Results: We would expect the size to be computed after the strip and compress commands to know the actual installed size, ie portage should show the following: # ebuild /usr/portage/sys-apps/portage/portage-2.2.28.ebuild install [...] strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version ecompressdir: bzip2 -9 /usr/share/doc ecompressdir: bzip2 -9 /usr/share/man * Final size of build directory: 19980 KiB * Final size of installed tree: 31172 KiB # du -ks /home/var_tmp/portage/sys-apps/portage-2.2.28/image/ 31172 /home/var_tmp/portage/sys-apps/portage-2.2.28/image/ The size is computed in __dyn_install function of /usr/lib64/portage/python3.4/phase-functions.sh. Moving this in install_qa_check function of /usr/lib64/portage/python3.4/misc-functions.sh shows the correct size. I actually don't know if it's the proper place to put it.
Created attachment 433904 [details, diff] Proposed patch to compute actual installed size.