1 |
Author: grobian |
2 |
Date: 2009-09-26 18:46:54 +0000 (Sat, 26 Sep 2009) |
3 |
New Revision: 14439 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/pym/portage/cache/sqlite.py |
7 |
main/branches/prefix/pym/portage/env/loaders.py |
8 |
Log: |
9 |
Merged from trunk -r14432:14435 |
10 |
|
11 |
| 14433 | Revert r14430 and fix to do as intended. Thanks to Arfrever | |
12 |
| zmedico | for reporting. | |
13 |
|
14 |
| 14435 | Bug #286475 - Fix KeyValuePairFileLoader.lineParser() so it | |
15 |
| zmedico | doesn't raise AttributeError when a key/value is redefined. | |
16 |
|
17 |
|
18 |
Modified: main/branches/prefix/pym/portage/cache/sqlite.py |
19 |
=================================================================== |
20 |
--- main/branches/prefix/pym/portage/cache/sqlite.py 2009-09-26 18:46:04 UTC (rev 14438) |
21 |
+++ main/branches/prefix/pym/portage/cache/sqlite.py 2009-09-26 18:46:54 UTC (rev 14439) |
22 |
@@ -33,7 +33,9 @@ |
23 |
|
24 |
def __init__(self, *args, **config): |
25 |
super(database, self).__init__(*args, **config) |
26 |
- self._allowed_keys = ["_mtime_", "_eclasses_"] + self._known_keys |
27 |
+ self._allowed_keys = ["_mtime_", "_eclasses_"] |
28 |
+ self._allowed_keys.extend(self._known_keys) |
29 |
+ self._allowed_keys.sort() |
30 |
self.location = os.path.join(self.location, |
31 |
self.label.lstrip(os.path.sep).rstrip(os.path.sep)) |
32 |
|
33 |
@@ -103,7 +105,7 @@ |
34 |
self._db_table["packages"]["create"] = " ".join(create_statement) |
35 |
self._db_table["packages"]["columns"] = \ |
36 |
self._db_table["packages"]["internal_columns"] + \ |
37 |
- sorted(self._allowed_keys) |
38 |
+ self._allowed_keys |
39 |
|
40 |
cursor = self._db_cursor |
41 |
for k, v in self._db_table.items(): |
42 |
|
43 |
Modified: main/branches/prefix/pym/portage/env/loaders.py |
44 |
=================================================================== |
45 |
--- main/branches/prefix/pym/portage/env/loaders.py 2009-09-26 18:46:04 UTC (rev 14438) |
46 |
+++ main/branches/prefix/pym/portage/env/loaders.py 2009-09-26 18:46:54 UTC (rev 14439) |
47 |
@@ -317,7 +317,4 @@ |
48 |
_("Value validation failed at line: %s, data %s") |
49 |
% (line_num + 1, value)) |
50 |
return |
51 |
- if key in data: |
52 |
- data[key].append(value) |
53 |
- else: |
54 |
- data[key] = value |
55 |
+ data[key] = value |