Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13899 - in main/branches/prefix: bin pym/portage pym/portage/dbapi
Date: Tue, 04 Aug 2009 17:00:22
Message-Id: E1MYNN5-0003hE-Om@stork.gentoo.org
1 Author: grobian
2 Date: 2009-08-04 17:00:19 +0000 (Tue, 04 Aug 2009)
3 New Revision: 13899
4
5 Modified:
6 main/branches/prefix/bin/emaint
7 main/branches/prefix/bin/emerge
8 main/branches/prefix/pym/portage/__init__.py
9 main/branches/prefix/pym/portage/dbapi/bintree.py
10 Log:
11 Merged from trunk -r13887:13895
12
13 | 13888 | Fix a regression caused by the code from bug #278729, which |
14 | zmedico | causes incorrect preference evaluation for cases like |
15 | | kde-base/nepomuk: || ( |
16 | | >=dev-libs/soprano-2.3.0[clucene,dbus,raptor,redland] |
17 | | >=dev-libs/soprano-2.3.0[clucene,dbus,raptor,java] ) In |
18 | | cases like this we need to prefer the choice which is |
19 | | already satisfied by current USE configuration. Thanks to |
20 | | Maciej Mrozowski <reavertm@××××××.fm> for reporting. |
21
22 | 13889 | Bug #280259 - Use codecs.open() when reading the Packages |
23 | zmedico | file inside binarytree.inject(), in order to avoid a |
24 | | UnicodeDecodeError when the file is later written as a |
25 | | unicode stream (via atomic_ofstream). |
26
27 | 13890 | Bug #280259 - Fix binarytree to always open the Packages |
28 | zmedico | file as unicode. |
29
30 | 13891 | Bug #280259 - Fix emaint to call binarytree._load_pkgindex() |
31 | zmedico | for unicode handling. |
32
33 | 13892 | Fix dep_zapdeps exception 'ValueError: need more than 3 |
34 | zmedico | values to unpack' from r13888. |
35
36 | 13893 | In the dep_zapdeps() code from bug #278729, set |
37 | zmedico | all_use_satisfied = False if the choice includes an |
38 | | unavailable package. |
39
40 | 13894 | Revert the code from bug #278729 for now since it need to be |
41 | zmedico | redone in order to account for the issue described in |
42 | | comment #3. |
43
44 | 13895 | Bug #280320 - Fix broken _emerge.main ImportError handler.. |
45 | zmedico | |
46
47
48 Modified: main/branches/prefix/bin/emaint
49 ===================================================================
50 --- main/branches/prefix/bin/emaint 2009-08-04 16:30:10 UTC (rev 13898)
51 +++ main/branches/prefix/bin/emaint 2009-08-04 17:00:19 UTC (rev 13899)
52 @@ -118,13 +118,8 @@
53 myroot = portage.settings["ROOT"]
54 self._bintree = portage.db[myroot]["bintree"]
55 self._bintree.populate()
56 - self._pkgindex_file = os.path.join(self._bintree.pkgdir, "Packages")
57 - self._pkgindex = self._bintree._new_pkgindex()
58 - f = open(self._pkgindex_file, 'r')
59 - try:
60 - self._pkgindex.read(f)
61 - finally:
62 - f.close()
63 + self._pkgindex_file = self._bintree._pkgindex_file
64 + self._pkgindex = self._bintree._load_pkgindex()
65
66 def check(self, onProgress=None):
67 missing = []
68 @@ -180,13 +175,8 @@
69 cpv_all = self._bintree.dbapi.cpv_all()
70 cpv_all.sort()
71
72 - pkgindex = bintree._new_pkgindex()
73 + pkgindex = bintree._load_pkgindex()
74 self._pkgindex = pkgindex
75 - f = open(self._pkgindex_file, 'r')
76 - try:
77 - self._pkgindex.read(f)
78 - finally:
79 - f.close()
80
81 metadata = {}
82 for d in pkgindex.packages:
83
84 Modified: main/branches/prefix/bin/emerge
85 ===================================================================
86 --- main/branches/prefix/bin/emerge 2009-08-04 16:30:10 UTC (rev 13898)
87 +++ main/branches/prefix/bin/emerge 2009-08-04 17:00:19 UTC (rev 13899)
88 @@ -26,6 +26,7 @@
89 pdb.set_trace()
90 signal.signal(signal.SIGUSR1, debug_signal)
91
92 +<<<<<<< .working
93 # for an explanation on this logic, see pym/_emerge/__init__.py
94 import os
95 import sys
96
97 Modified: main/branches/prefix/pym/portage/__init__.py
98 ===================================================================
99 --- main/branches/prefix/pym/portage/__init__.py 2009-08-04 16:30:10 UTC (rev 13898)
100 +++ main/branches/prefix/pym/portage/__init__.py 2009-08-04 17:00:19 UTC (rev 13899)
101 @@ -6943,9 +6943,6 @@
102 if portage.dep._dep_check_strict:
103 raise portage.exception.ParseError(
104 "invalid atom: '%s'" % x)
105 - else:
106 - # Only real Atom instances are allowed past this point.
107 - continue
108 else:
109 if x.blocker and x.blocker.overlap.forbid and \
110 eapi in ("0", "1") and portage.dep._dep_check_strict:
111 @@ -7167,9 +7164,7 @@
112 for atom in atoms:
113 if atom[:1] == "!":
114 continue
115 - # Ignore USE dependencies here since we don't want USE
116 - # settings to adversely affect || preference evaluation.
117 - avail_pkg = mydbapi.match(atom.without_use)
118 + avail_pkg = mydbapi.match(atom)
119 if avail_pkg:
120 avail_pkg = avail_pkg[-1] # highest (ascending order)
121 avail_slot = "%s:%s" % (dep_getkey(atom),
122
123 Modified: main/branches/prefix/pym/portage/dbapi/bintree.py
124 ===================================================================
125 --- main/branches/prefix/pym/portage/dbapi/bintree.py 2009-08-04 16:30:10 UTC (rev 13898)
126 +++ main/branches/prefix/pym/portage/dbapi/bintree.py 2009-08-04 17:00:19 UTC (rev 13899)
127 @@ -22,6 +22,7 @@
128
129 from portage import dep_expand, listdir, _check_distfile, _movefile
130
131 +import codecs
132 import os, errno, stat
133 import re
134 from itertools import chain, izip
135 @@ -432,18 +433,8 @@
136 dirs.remove("All")
137 dirs.sort()
138 dirs.insert(0, "All")
139 - pkgindex = self._new_pkgindex()
140 + pkgindex = self._load_pkgindex()
141 pf_index = None
142 - try:
143 - f = open(self._pkgindex_file)
144 - except EnvironmentError:
145 - pass
146 - else:
147 - try:
148 - pkgindex.read(f)
149 - finally:
150 - f.close()
151 - del f
152 if not self._pkgindex_version_supported(pkgindex):
153 pkgindex = self._new_pkgindex()
154 header = pkgindex.header
155 @@ -649,7 +640,8 @@
156 urldata[1] + urldata[2], "Packages")
157 pkgindex = self._new_pkgindex()
158 try:
159 - f = open(pkgindex_file)
160 + f = codecs.open(pkgindex_file,
161 + encoding='utf_8', errors='replace')
162 try:
163 pkgindex.read(f)
164 finally:
165 @@ -848,17 +840,8 @@
166 self.getname(cpv).split(os.path.sep)[-2] == "All":
167 self._create_symlink(cpv)
168 created_symlink = True
169 - pkgindex = self._new_pkgindex()
170 - try:
171 - f = open(self._pkgindex_file)
172 - except EnvironmentError:
173 - pass
174 - else:
175 - try:
176 - pkgindex.read(f)
177 - finally:
178 - f.close()
179 - del f
180 + pkgindex = self._load_pkgindex()
181 +
182 if not self._pkgindex_version_supported(pkgindex):
183 pkgindex = self._new_pkgindex()
184
185 @@ -1099,7 +1082,8 @@
186 def _load_pkgindex(self):
187 pkgindex = self._new_pkgindex()
188 try:
189 - f = open(self._pkgindex_file)
190 + f = codecs.open(self._pkgindex_file,
191 + encoding='utf8', errors='replace')
192 except EnvironmentError:
193 pass
194 else: