diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-21 19:07:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-21 19:07:30 +0000 |
commit | 5f713b628b4445b8c0e18e08e762b1ef301fdab1 (patch) | |
tree | 658bd649279d3437e02340ad1fe69a0aaef4971e /pym | |
parent | 5737e903a88b3909b19751bcd5596158ca740c05 (diff) | |
download | portage-5f713b628b4445b8c0e18e08e762b1ef301fdab1.tar.gz portage-5f713b628b4445b8c0e18e08e762b1ef301fdab1.tar.bz2 portage-5f713b628b4445b8c0e18e08e762b1ef301fdab1.zip |
Fix `emerge -s` download size calculation for bug #130750.
svn path=/main/trunk/; revision=3184
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage_manifest.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 1b7135c97..06f6ac6ed 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -486,7 +486,13 @@ class Manifest(object): def _getCpvDistfiles(self, cpv): """ Get a list of all DIST files associated to the given cpv """ return self.fetchlist_dict[cpv] - + + def getDistfilesSize(self, fetchlist): + total_bytes = 0 + for f in fetchlist: + total_bytes += int(self.fhashdict["DIST"][f]["size"]) + return total_bytes + def updateFileHashes(self, ftype, fname, checkExisting=True, ignoreMissing=True, reuseExisting=False): """ Regenerate hashes for the given file """ if checkExisting: |