1 |
Author: zmedico |
2 |
Date: 2010-02-10 00:13:16 +0000 (Wed, 10 Feb 2010) |
3 |
New Revision: 15333 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/bintree.py |
7 |
Log: |
8 |
Bug #303211 - Discard invalid SIZE metadata when using the old binhost |
9 |
protocol. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/dbapi/bintree.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/dbapi/bintree.py 2010-02-09 21:27:47 UTC (rev 15332) |
15 |
+++ main/trunk/pym/portage/dbapi/bintree.py 2010-02-10 00:13:16 UTC (rev 15333) |
16 |
@@ -838,6 +838,17 @@ |
17 |
remote_metadata = self.remotepkgs[mypkg] |
18 |
for k, v in remote_metadata.items(): |
19 |
remote_metadata[k] = v.strip() |
20 |
+ |
21 |
+ # Eliminate metadata values with names that digestCheck |
22 |
+ # uses, since they are not valid when using the old |
23 |
+ # protocol. Typically this is needed for SIZE metadata |
24 |
+ # which corresponds to the size of the unpacked files |
25 |
+ # rather than the binpkg file size, triggering digest |
26 |
+ # verification failures as reported in bug #303211. |
27 |
+ remote_metadata.pop('SIZE', None) |
28 |
+ for k in portage.checksum.hashfunc_map: |
29 |
+ remote_metadata.pop(k, None) |
30 |
+ |
31 |
self._remotepkgs[fullpkg] = remote_metadata |
32 |
#print " -- Injected" |
33 |
except SystemExit as e: |