diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-02-12 04:15:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-02-12 04:15:51 +0000 |
commit | 16c5baa44ccbf85c0664775dff6bb01283b338c6 (patch) | |
tree | ce5f71cae536e272aa9c7cd1a8eb833c430bb52c /bin/emerge | |
parent | e559940e19ac2d32109df4b275ea9744e57171e9 (diff) | |
download | portage-16c5baa44ccbf85c0664775dff6bb01283b338c6.tar.gz portage-16c5baa44ccbf85c0664775dff6bb01283b338c6.tar.bz2 portage-16c5baa44ccbf85c0664775dff6bb01283b338c6.zip |
Bug #209768 - Fix --search "Size of files:" handling so that it properlyv2.1.4.4
shows the "Unknown (missing digest)" message instead of a traceback.
(trunk r9333)
svn path=/main/branches/2.1.2/; revision=9334
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge index 2863b10d0..bef6f4061 100755 --- a/bin/emerge +++ b/bin/emerge @@ -624,6 +624,7 @@ class search: myversion = self.getVersion(full_package, search.VERSION_RELEASE) mysum = [0,0] + file_size_str = None mycat = match.split("/")[0] mypkg = match.split("/")[1] mycpv = match + "-" + myversion @@ -638,7 +639,7 @@ class search: try: mysum[0] = mf.getDistfilesSize(fetchlist) except KeyError, e: - mysum[0] = "Unknown (missing digest for %s)" % \ + file_size_str = "Unknown (missing digest for %s)" % \ str(e) available = False @@ -654,13 +655,13 @@ class search: myebuild = None break - if myebuild: + if myebuild and file_size_str is None: mystr = str(mysum[0] / 1024) mycount = len(mystr) while (mycount > 3): mycount -= 3 mystr = mystr[:mycount] + "," + mystr[mycount:] - mysum[0] = mystr + " kB" + file_size_str = mystr + " kB" if self.verbose: if available: @@ -668,7 +669,7 @@ class search: print " ", self.getInstallationStatus(mycat+'/'+mypkg) if myebuild: print " %s %s" % \ - (darkgreen("Size of files:"), mysum[0]) + (darkgreen("Size of files:"), file_size_str) print " ", darkgreen("Homepage:")+" ",homepage print " ", darkgreen("Description:")+" ",desc print " ", darkgreen("License:")+" ",license |