Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124976 - emerge -s <package> shows incorrect Size of files.
Summary: emerge -s <package> shows incorrect Size of files.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 129184 133256 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-04 10:09 UTC by Samuli Suominen (RETIRED)
Modified: 2007-01-11 05:19 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2006-03-04 10:09:38 UTC
unaffiliated ~ # emerge -s acroread

Searching...
[ Results for search key : acroread ]
[ Applications found : 2 ]

*  app-text/acroread
      Latest version available: 7.0.5-r1
      Latest version installed: 7.0.5-r1
      Size of files: 220,411 kB <--- Here, wtf ? :-)
      Homepage:      http://www.adobe.com/products/acrobat/
      Description:   Adobe's PDF reader
      License:       Adobe

*  media-fonts/acroread-asianfonts
      Latest version available: 7.0.20050728
      Latest version installed: [ Not Installed ]
      Size of files: 37,676 kB
      Homepage:      http://www.adobe.com/products/acrobat/acrrasianfontpack.html
      Description:   Asian font packs for Adobe Acrobat Reader
      License:       Adobe


unaffiliated ~ # emerge -av acroread


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] app-text/acroread-7.0.5-r1  USE="cups nls -ldap -nsplugin" 37,866 kB

Total size of downloads: 37,866 kB

Do you want me to merge these packages? [Yes/No]

Portage 2.1_pre5-r2 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.3.6-r3, 2.6.15-gentoo-r5 i686)

And, a friend who replicated it: 20:06 <@Kaja> 2.1_pre5-r3
Comment 1 Nick Devito 2006-03-04 10:11:57 UTC
It's probably pulling the size of the package from the digest, which has 5 files, one for english, etc. But, when you go to emerge the package, it grabs the correct file, and only 1 of those files. 
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2006-03-04 10:16:44 UTC
Yeah, looks like it does that.. but why? That's just crazy. Was expecting output like eix, or esearch gives.
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2006-03-04 19:42:14 UTC
While it may be a little strange, there number is correct. The package supports several language variants enabled by using LINGUAS and the total size includes the sizes of those too. That is to say, "size of files" means the size of all files rather than only the ones needed by your particular configuration.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2006-03-05 17:36:02 UTC
Actually -s should use the same code as -p IMO which it currently doesn't (stumbled about that while testing the restriction code).
Comment 5 benjrh 2006-03-14 23:37:22 UTC
(In reply to comment #3)

The size of a file is included in the total once for each digest given for that file, which is plainly wrong, e.g.:

MD5 59198ce8f82c45cb47227ea6ff4dc641 portage-2.1_pre6.tar.bz2 260675
RMD160 3f1ee96ebda74b0095e1078c048ec3197c05aa79 portage-2.1_pre6.tar.bz2 260675
SHA256 ee026ade6e26fd21b3c013c1a1a36727e6170030d22af8c2e8c5e1337e2723ce portage-2.1_pre6.tar.bz2 260675

*  sys-apps/portage
      Latest version available: 2.1_pre6-r3
      Latest version installed: 2.1_pre6-r3
      Size of files: 763 kB
      Homepage:      http://www.gentoo.org/
      Description:   The Portage Package Management System. The primary package management and distribution system for Gentoo.
      License:       GPL-2
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-03-15 09:12:29 UTC
(In reply to comment #5)
> (In reply to comment #3)
> 
> The size of a file is included in the total once for each digest given for that
> file, which is plainly wrong, e.g.:
> 
Wrong?  redundant, stupid maybe, but not wrong :)
Half of the problem with adding new features to this program is the hundreds of thousands of current users that may experience breakage; in this case we didn't change the crappy manifest format ( although a new format is in the works ).
The old portage only used 1 hash ( MD5 ) so putting the size after it made at least some sense, obviously not well planned for expansion :)
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2006-03-15 09:24:05 UTC
(In reply to comment #6)
> Wrong?  redundant, stupid maybe, but not wrong :)

The manifest isn't wrong, but the code using the manifest to calculate the download size certainly is if it's tkaing all sizes into account :/.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-04-07 15:20:58 UTC
*** Bug 129184 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-05-13 20:55:48 UTC
*** Bug 133256 has been marked as a duplicate of this bug. ***
Comment 10 Zac Medico gentoo-dev 2006-05-13 21:53:50 UTC
(In reply to comment #4)
> Actually -s should use the same code as -p IMO which it currently doesn't
> (stumbled about that while testing the restriction code).

If we're going to change the size calculation then "Size of files" won't be fitting anymore.  The code for the `emerge -pv` size calculation doesn't include files in $DISTDIR that have the correct size.  I suppose we could include both calculations in the ouput, so it would look something like this:

*  app-text/acroread
      Latest version available: 7.0.5-r2
      Latest version installed: 7.0.5-r2
      Size of files: 661,839 kB
      Size of downloads: 0 kB
      Homepage:      http://www.adobe.com/products/acrobat/
      Description:   Adobe's PDF reader
      License:       Adobe
Comment 11 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 05:19:18 UTC
This seems to be fixed.