Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582718 - sys-apps/portage-2.2.28 reports incorrect installed packages size (patch included)
Summary: sys-apps/portage-2.2.28 reports incorrect installed packages size (patch incl...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-11 06:19 UTC by Jocelyn Mayer
Modified: 2016-05-11 06:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch to compute actual installed size. (portage_install_size.diff,1.30 KB, patch)
2016-05-11 06:20 UTC, Jocelyn Mayer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Mayer 2016-05-11 06:19:48 UTC
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.
Comment 1 Jocelyn Mayer 2016-05-11 06:20:58 UTC
Created attachment 433904 [details, diff]
Proposed patch to compute actual installed size.