diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-11-23 12:10:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-11-23 12:10:22 +0000 |
commit | 5bebada2dadf920d0fdf10739fbcd731ae2fb53b (patch) | |
tree | 88c325c3fc2abd0ea359c917d4e1a03fc6c9f5e6 | |
parent | f14499852651ac81041f4eef4466a9438a5e71ec (diff) | |
download | portage-5bebada2dadf920d0fdf10739fbcd731ae2fb53b.tar.gz portage-5bebada2dadf920d0fdf10739fbcd731ae2fb53b.tar.bz2 portage-5bebada2dadf920d0fdf10739fbcd731ae2fb53b.zip |
For bug #156014, always round up the next kB so that it doesn't show 0 kB when some small file still needs to be fetched.
svn path=/main/trunk/; revision=5122
-rwxr-xr-x | bin/emerge | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/emerge b/bin/emerge index 92c5b98fe..0651da960 100755 --- a/bin/emerge +++ b/bin/emerge @@ -274,6 +274,10 @@ def countdown(secs=5, doing="Starting"): def format_size(mysize): if type(mysize) not in [types.IntType,types.LongType]: return str(mysize) + if 0 != mysize % 1024: + # Always round up to the next kB so that it doesn't show 0 kB when + # some small file still needs to be fetched. + mysize += 1024 - mysize % 1024 mystr=str(mysize/1024) mycount=len(mystr) while (mycount > 3): |