1 |
commit: 2790e4405fc6cbeb3e5e6e138f357d09cbc4b46f |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 29 13:06:43 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 29 13:06:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2790e440 |
7 |
|
8 |
sys-apps/portage: add/update patch for prefix-chaining, bug #642456 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/642456 |
11 |
Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6 |
12 |
|
13 |
.../portage-2.2.00.15801-prefix-chaining.patch | 693 --------------------- |
14 |
.../portage-2.2.01.18826-aix-preservelibs.patch | 32 - |
15 |
.../portage-2.2.01.19247-aix-preserve-libs.patch | 163 ----- |
16 |
...portage-2.2.10.1-brokentty-more-platforms.patch | 35 -- |
17 |
.../portage-2.2.10.1-case-insensitive-fs.patch | 375 ----------- |
18 |
...ortage-2.2.7-macho-relative-install_names.patch | 68 -- |
19 |
sys-apps/portage/files/portage-2.2.7-sandbox.patch | 21 - |
20 |
.../files/portage-2.2.7-shebang-fixes.patch | 153 ----- |
21 |
....patch => portage-2.3.18-prefix-chaining.patch} | 182 +++--- |
22 |
.../files/portage-2.3.4-mj-safe-econf.patch | 39 -- |
23 |
sys-apps/portage/portage-2.3.18.ebuild | 2 +- |
24 |
11 files changed, 80 insertions(+), 1683 deletions(-) |
25 |
|
26 |
diff --git a/sys-apps/portage/files/portage-2.2.00.15801-prefix-chaining.patch b/sys-apps/portage/files/portage-2.2.00.15801-prefix-chaining.patch |
27 |
deleted file mode 100644 |
28 |
index 01e5934448..0000000000 |
29 |
--- a/sys-apps/portage/files/portage-2.2.00.15801-prefix-chaining.patch |
30 |
+++ /dev/null |
31 |
@@ -1,693 +0,0 @@ |
32 |
-diff -ru prefix-portage-2.2.00.15801.orig/bin/ebuild.sh prefix-portage-2.2.00.15801/bin/ebuild.sh |
33 |
---- prefix-portage-2.2.00.15801.orig/bin/ebuild.sh 2010-03-11 10:39:16 +0100 |
34 |
-+++ prefix-portage-2.2.00.15801/bin/ebuild.sh 2010-03-11 10:38:21 +0100 |
35 |
-@@ -123,6 +123,83 @@ |
36 |
- # Unset some variables that break things. |
37 |
- unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE |
38 |
- |
39 |
-+if [[ -n "${PORTAGE_READONLY_EPREFIXES}" ]]; then |
40 |
-+ new_PATH=${PATH} |
41 |
-+ |
42 |
-+ prefixes="${PORTAGE_READONLY_EPREFIXES}:${EPREFIX}" |
43 |
-+ |
44 |
-+ # build up a PATH for the current environment. the path has to |
45 |
-+ # contain all the paths the start with $EPREFIX _first_, and |
46 |
-+ # after that, all the others. We have to re-order the new_PATH, |
47 |
-+ # so that EPREFIX paths move to the front. after that, the paths |
48 |
-+ # of all parent prefixes are added, and finally, after that, the |
49 |
-+ # paths not containing any prefix are added. |
50 |
-+ |
51 |
-+ save_IFS=$IFS |
52 |
-+ IFS=':' |
53 |
-+ pth_pfx= |
54 |
-+ pth_nopfx= |
55 |
-+ for pth in ${new_PATH}; do |
56 |
-+ IFS=$save_IFS |
57 |
-+ if [[ "${pth#${EPREFIX}}" == "${pth}" ]]; then |
58 |
-+ [[ ":${pth_nopfx}:" == *":${pth}:"* ]] && continue |
59 |
-+ if [[ -z "${pth_nopfx}" ]]; then |
60 |
-+ pth_nopfx="${pth}" |
61 |
-+ else |
62 |
-+ pth_nopfx="${pth_nopfx}:${pth}" |
63 |
-+ fi |
64 |
-+ else |
65 |
-+ [[ ":${pth_pfx}:" == *":${pth}:"* ]] && continue |
66 |
-+ if [[ -z "${pth_pfx}" ]]; then |
67 |
-+ pth_pfx="${pth}" |
68 |
-+ else |
69 |
-+ pth_pfx="${pth_pfx}:${pth}" |
70 |
-+ fi |
71 |
-+ fi |
72 |
-+ done |
73 |
-+ IFS=$save_IFS |
74 |
-+ |
75 |
-+ new_PATH= |
76 |
-+ |
77 |
-+ save_IFS=$IFS |
78 |
-+ IFS=':' |
79 |
-+ for eroot in ${prefixes}; do |
80 |
-+ IFS=$save_IFS |
81 |
-+ if [[ -f ${eroot}/usr/share/portage/config/make.globals ]]; then |
82 |
-+ # ok, there is a portage instance installed in this prefix, |
83 |
-+ # so we can ask (politely) for the DEFAULT_PATH of it :) |
84 |
-+ |
85 |
-+ defpath="$(. ${eroot}/etc/make.globals && echo $DEFAULT_PATH)" |
86 |
-+ okpath= |
87 |
-+ save_IFS2=$IFS |
88 |
-+ IFS=':' |
89 |
-+ for p in $defpath; do |
90 |
-+ IFS=$save_IFS2 |
91 |
-+ # we have that one already... |
92 |
-+ [[ ":${new_PATH}:" == *":$p:"* ]] && continue |
93 |
-+ # we skip paths, that are outside our prefix ... |
94 |
-+ [[ "${p#${eroot}}" == "${p}" ]] && continue |
95 |
-+ if [[ -z "${okpath}" ]]; then |
96 |
-+ okpath="${p}" |
97 |
-+ else |
98 |
-+ okpath="${okpath}:${p}" |
99 |
-+ fi |
100 |
-+ done |
101 |
-+ IFS=$save_IFS2 |
102 |
-+ |
103 |
-+ new_PATH="${okpath}:${new_PATH}" |
104 |
-+ else |
105 |
-+ # no portage installed in this prefix. this means we have to |
106 |
-+ # somehow fiddle together a sane path for that prefix for at |
107 |
-+ # least the standard things to work. |
108 |
-+ new_PATH="${eroot}/usr/bin:${eroot}/usr/sbin:${eroot}/bin:${eroot}/sbin:${new_PATH}" |
109 |
-+ fi |
110 |
-+ done |
111 |
-+ IFS=$save_IFS |
112 |
-+ |
113 |
-+ export PATH=${pth_pfx}:$new_PATH:${pth_nopfx} |
114 |
-+fi |
115 |
-+ |
116 |
- source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null |
117 |
- |
118 |
- [[ $PORTAGE_QUIET != "" ]] && export PORTAGE_QUIET |
119 |
-@@ -1988,7 +2065,11 @@ |
120 |
- |
121 |
- #PATH=$_ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin${ROOTPATH:+:}$ROOTPATH |
122 |
- # PREFIX: same notes apply as at the top of this file |
123 |
-- PATH="$_ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}${ROOTPATH:+:}$ROOTPATH${EXTRA_PATH:+:}${EXTRA_PATH}" |
124 |
-+ #PATH="$_ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}${ROOTPATH:+:}$ROOTPATH${EXTRA_PATH:+:}${EXTRA_PATH}" |
125 |
-+ # PREFIX (with CHAINING!): why the heck not simply pre-pend the paths? hell, |
126 |
-+ # this shot down prefix-chaining, and made me search a while... |
127 |
-+ # PATH has been set up at the top of the file already. |
128 |
-+ PATH="${ebuild_helpers_path}:${PATH}" |
129 |
- unset _ebuild_helpers_path |
130 |
- |
131 |
- if hasq distcc $FEATURES ; then |
132 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/_emerge/actions.py prefix-portage-2.2.00.15801/pym/_emerge/actions.py |
133 |
---- prefix-portage-2.2.00.15801.orig/pym/_emerge/actions.py 2010-03-11 10:39:16 +0100 |
134 |
-+++ prefix-portage-2.2.00.15801/pym/_emerge/actions.py 2010-03-11 10:38:21 +0100 |
135 |
-@@ -1783,8 +1783,9 @@ |
136 |
- "control (contains %s).\n!!! Aborting rsync sync.\n") % \ |
137 |
- (myportdir, vcs_dir), level=logging.ERROR, noiselevel=-1) |
138 |
- return 1 |
139 |
-- if not os.path.exists(EPREFIX + "/usr/bin/rsync"): |
140 |
-- print("!!! " + EPREFIX + "/usr/bin/rsync does not exist, so rsync support is disabled.") |
141 |
-+ rsync_bin = portage.readonly_pathmatch_any(settings, "/usr/bin/rsync") |
142 |
-+ if not os.path.exists(rsync_bin): |
143 |
-+ print("!!! rsync binary does not exist, so rsync support is disabled.") |
144 |
- print("!!! Type \"emerge net-misc/rsync\" to enable rsync support.") |
145 |
- sys.exit(1) |
146 |
- mytimeout=180 |
147 |
-@@ -1957,7 +1958,7 @@ |
148 |
- if mytimestamp != 0 and "--quiet" not in myopts: |
149 |
- print(">>> Checking server timestamp ...") |
150 |
- |
151 |
-- rsynccommand = [EPREFIX + "/usr/bin/rsync"] + rsync_opts + extra_rsync_opts |
152 |
-+ rsynccommand = [rsync_bin] + rsync_opts + extra_rsync_opts |
153 |
- |
154 |
- if "--debug" in myopts: |
155 |
- print(rsynccommand) |
156 |
-@@ -2108,8 +2109,9 @@ |
157 |
- out.eerror(line) |
158 |
- sys.exit(exitcode) |
159 |
- elif syncuri[:6]=="cvs://": |
160 |
-- if not os.path.exists(EPREFIX + "/usr/bin/cvs"): |
161 |
-- print("!!! " + EPREFIX + "/usr/bin/cvs does not exist, so CVS support is disabled.") |
162 |
-+ cvs_bin = portage.readonly_pathmatch_any(settings, "/usr/bin/cvs") |
163 |
-+ if not os.path.exists(cvs_bin): |
164 |
-+ print("!!! cvs binary does not exist, so CVS support is disabled.") |
165 |
- print("!!! Type \"emerge dev-util/cvs\" to enable CVS support.") |
166 |
- sys.exit(1) |
167 |
- cvsroot=syncuri[6:] |
168 |
-@@ -2128,7 +2130,7 @@ |
169 |
- "!!! existing '%s' directory; exiting.\n" % myportdir) |
170 |
- sys.exit(1) |
171 |
- del e |
172 |
-- if portage.spawn("cd "+cvsdir+"; cvs -z0 -d "+cvsroot+" co -P gentoo-x86",settings,free=1): |
173 |
-+ if portage.spawn("cd "+cvsdir+"; "+cvs_bin+" -z0 -d "+cvsroot+" co -P gentoo-x86",settings,free=1): |
174 |
- print("!!! cvs checkout error; exiting.") |
175 |
- sys.exit(1) |
176 |
- os.rename(os.path.join(cvsdir, "gentoo-x86"), myportdir) |
177 |
-@@ -2136,15 +2138,16 @@ |
178 |
- #cvs update |
179 |
- print(">>> Starting cvs update with "+syncuri+"...") |
180 |
- retval = portage.process.spawn_bash( |
181 |
-- "cd %s; cvs -z0 -q update -dP" % \ |
182 |
-- (portage._shell_quote(myportdir),), **spawn_kwargs) |
183 |
-+ "cd %s; %s -z0 -q update -dP" % \ |
184 |
-+ (portage._shell_quote(myportdir),cvs_bin), **spawn_kwargs) |
185 |
- if retval != os.EX_OK: |
186 |
- sys.exit(retval) |
187 |
- dosyncuri = syncuri |
188 |
- elif syncuri[:11]=="svn+http://" or syncuri[:6]=="svn://" or syncuri[:12]=="svn+https://": |
189 |
- # Gentoo Prefix hardcoded SVN support |
190 |
-- if not os.path.exists(EPREFIX + "/usr/bin/svn"): |
191 |
-- print("!!! " + EPREFIX + "/usr/bin/svn does not exist, so SVN support is disabled.") |
192 |
-+ svn_bin = portage.readonly_pathmatch_any(settings, "/usr/bin/svn") |
193 |
-+ if not os.path.exists(svn_bin): |
194 |
-+ print("!!! svn binary does not exist, so SVN support is disabled.") |
195 |
- print("!!! Type \"emerge dev-util/subversion\" to enable SVN support.") |
196 |
- sys.exit(1) |
197 |
- svndir=os.path.dirname(myportdir) |
198 |
-@@ -2171,7 +2174,7 @@ |
199 |
- else: |
200 |
- #svn update |
201 |
- print(">>> Starting svn update...") |
202 |
-- retval = portage.spawn("cd '%s'; svn update" % myportdir, \ |
203 |
-+ retval = portage.spawn("cd '%s'; %s update" % (myportdir,svn_bin), \ |
204 |
- settings, free=1) |
205 |
- if retval != os.EX_OK: |
206 |
- sys.exit(retval) |
207 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/_emerge/depgraph.py prefix-portage-2.2.00.15801/pym/_emerge/depgraph.py |
208 |
---- prefix-portage-2.2.00.15801.orig/pym/_emerge/depgraph.py 2010-03-11 10:39:16 +0100 |
209 |
-+++ prefix-portage-2.2.00.15801/pym/_emerge/depgraph.py 2010-03-11 10:39:49 +0100 |
210 |
-@@ -17,6 +17,7 @@ |
211 |
- from portage.dbapi import dbapi |
212 |
- from portage.dbapi.dep_expand import dep_expand |
213 |
- from portage.dep import Atom |
214 |
-+from portage.dep.dep_check import ro_selected |
215 |
- from portage.output import bold, blue, colorize, create_color_func, darkblue, \ |
216 |
- darkgreen, green, nc_len, red, teal, turquoise, yellow |
217 |
- bad = create_color_func("BAD") |
218 |
-@@ -1143,14 +1144,14 @@ |
219 |
- edepend["DEPEND"] = "" |
220 |
- |
221 |
- deps = ( |
222 |
-- (bdeps_root, edepend["DEPEND"], |
223 |
-+ (bdeps_root, "DEPEND", |
224 |
- self._priority(buildtime=(not bdeps_optional), |
225 |
- optional=bdeps_optional), |
226 |
- pkg.built), |
227 |
-- (myroot, edepend["RDEPEND"], |
228 |
-+ (myroot, "RDEPEND", |
229 |
- self._priority(runtime=True), |
230 |
- False), |
231 |
-- (myroot, edepend["PDEPEND"], |
232 |
-+ (myroot, "PDEPEND", |
233 |
- self._priority(runtime_post=True), |
234 |
- False) |
235 |
- ) |
236 |
-@@ -1161,7 +1162,8 @@ |
237 |
- if not strict: |
238 |
- portage.dep._dep_check_strict = False |
239 |
- |
240 |
-- for dep_root, dep_string, dep_priority, ignore_blockers in deps: |
241 |
-+ for dep_root, dep_type, dep_priority, ignore_blockers in deps: |
242 |
-+ dep_string = edepend[dep_type] |
243 |
- if not dep_string: |
244 |
- continue |
245 |
- if debug: |
246 |
-@@ -1180,7 +1182,7 @@ |
247 |
- uselist=pkg.use.enabled)) |
248 |
- |
249 |
- dep_string = list(self._queue_disjunctive_deps( |
250 |
-- pkg, dep_root, dep_priority, dep_string)) |
251 |
-+ pkg, dep_root, dep_priority, dep_string, dep_type)) |
252 |
- |
253 |
- except portage.exception.InvalidDependString as e: |
254 |
- if pkg.installed: |
255 |
-@@ -1196,7 +1198,7 @@ |
256 |
- |
257 |
- if not self._add_pkg_dep_string( |
258 |
- pkg, dep_root, dep_priority, dep_string, |
259 |
-- allow_unsatisfied, ignore_blockers=ignore_blockers): |
260 |
-+ allow_unsatisfied, ignore_blockers=ignore_blockers, dep_type=dep_type): |
261 |
- return 0 |
262 |
- |
263 |
- except portage.exception.AmbiguousPackageName as e: |
264 |
-@@ -1224,7 +1226,7 @@ |
265 |
- return 1 |
266 |
- |
267 |
- def _add_pkg_dep_string(self, pkg, dep_root, dep_priority, dep_string, |
268 |
-- allow_unsatisfied, ignore_blockers=False): |
269 |
-+ allow_unsatisfied, ignore_blockers=False, dep_type=None): |
270 |
- depth = pkg.depth + 1 |
271 |
- debug = "--debug" in self._frozen_config.myopts |
272 |
- strict = pkg.type_name != "installed" |
273 |
-@@ -1240,7 +1242,7 @@ |
274 |
- try: |
275 |
- selected_atoms = self._select_atoms(dep_root, |
276 |
- dep_string, myuse=pkg.use.enabled, parent=pkg, |
277 |
-- strict=strict, priority=dep_priority) |
278 |
-+ strict=strict, priority=dep_priority, dep_type=dep_type) |
279 |
- except portage.exception.InvalidDependString as e: |
280 |
- show_invalid_depstring_notice(pkg, dep_string, str(e)) |
281 |
- del e |
282 |
-@@ -1395,7 +1397,7 @@ |
283 |
- child_pkgs = atom_pkg_graph.child_nodes(atom) |
284 |
- yield (atom, child_pkgs[0]) |
285 |
- |
286 |
-- def _queue_disjunctive_deps(self, pkg, dep_root, dep_priority, dep_struct): |
287 |
-+ def _queue_disjunctive_deps(self, pkg, dep_root, dep_priority, dep_struct, dep_type=None): |
288 |
- """ |
289 |
- Queue disjunctive (virtual and ||) deps in self._dynamic_config._dep_disjunctive_stack. |
290 |
- Yields non-disjunctive deps. Raises InvalidDependString when |
291 |
-@@ -1406,11 +1408,11 @@ |
292 |
- x = dep_struct[i] |
293 |
- if isinstance(x, list): |
294 |
- for y in self._queue_disjunctive_deps( |
295 |
-- pkg, dep_root, dep_priority, x): |
296 |
-+ pkg, dep_root, dep_priority, x, dep_type): |
297 |
- yield y |
298 |
- elif x == "||": |
299 |
- self._queue_disjunction(pkg, dep_root, dep_priority, |
300 |
-- [ x, dep_struct[ i + 1 ] ] ) |
301 |
-+ [ x, dep_struct[ i + 1 ] ] , dep_type) |
302 |
- i += 1 |
303 |
- else: |
304 |
- try: |
305 |
-@@ -1425,25 +1427,25 @@ |
306 |
- # purpose. |
307 |
- if x.cp.startswith('virtual/'): |
308 |
- self._queue_disjunction( pkg, dep_root, |
309 |
-- dep_priority, [ str(x) ] ) |
310 |
-+ dep_priority, [ str(x) ] , dep_type) |
311 |
- else: |
312 |
- yield str(x) |
313 |
- i += 1 |
314 |
- |
315 |
-- def _queue_disjunction(self, pkg, dep_root, dep_priority, dep_struct): |
316 |
-+ def _queue_disjunction(self, pkg, dep_root, dep_priority, dep_struct, dep_type=None): |
317 |
- self._dynamic_config._dep_disjunctive_stack.append( |
318 |
-- (pkg, dep_root, dep_priority, dep_struct)) |
319 |
-+ (pkg, dep_root, dep_priority, dep_struct, dep_type)) |
320 |
- |
321 |
- def _pop_disjunction(self, allow_unsatisfied): |
322 |
- """ |
323 |
- Pop one disjunctive dep from self._dynamic_config._dep_disjunctive_stack, and use it to |
324 |
- populate self._dynamic_config._dep_stack. |
325 |
- """ |
326 |
-- pkg, dep_root, dep_priority, dep_struct = \ |
327 |
-+ pkg, dep_root, dep_priority, dep_struct, dep_type = \ |
328 |
- self._dynamic_config._dep_disjunctive_stack.pop() |
329 |
- dep_string = portage.dep.paren_enclose(dep_struct) |
330 |
- if not self._add_pkg_dep_string( |
331 |
-- pkg, dep_root, dep_priority, dep_string, allow_unsatisfied): |
332 |
-+ pkg, dep_root, dep_priority, dep_string, allow_unsatisfied, dep_type): |
333 |
- return 0 |
334 |
- return 1 |
335 |
- |
336 |
-@@ -2063,12 +2065,18 @@ |
337 |
- return self._select_atoms_highest_available(*pargs, **kwargs) |
338 |
- |
339 |
- def _select_atoms_highest_available(self, root, depstring, |
340 |
-- myuse=None, parent=None, strict=True, trees=None, priority=None): |
341 |
-+ myuse=None, parent=None, strict=True, trees=None, priority=None, dep_type=None): |
342 |
- """This will raise InvalidDependString if necessary. If trees is |
343 |
- None then self._dynamic_config._filtered_trees is used.""" |
344 |
- pkgsettings = self._frozen_config.pkgsettings[root] |
345 |
- if trees is None: |
346 |
- trees = self._dynamic_config._filtered_trees |
347 |
-+ |
348 |
-+ # this one is needed to guarantee good readonly root |
349 |
-+ # resolution display in the merge list. required since |
350 |
-+ # parent (below) can be None |
351 |
-+ trees[root]["disp_parent"] = parent |
352 |
-+ |
353 |
- atom_graph = digraph() |
354 |
- if True: |
355 |
- try: |
356 |
-@@ -2081,7 +2089,7 @@ |
357 |
- portage.dep._dep_check_strict = False |
358 |
- mycheck = portage.dep_check(depstring, None, |
359 |
- pkgsettings, myuse=myuse, |
360 |
-- myroot=root, trees=trees) |
361 |
-+ myroot=root, trees=trees, dep_type=dep_type) |
362 |
- finally: |
363 |
- if parent is not None: |
364 |
- trees[root].pop("parent") |
365 |
-@@ -2116,6 +2124,7 @@ |
366 |
- selected_atoms[pkg] = [atom for atom in \ |
367 |
- atom_graph.child_nodes(node) if atom in chosen_atoms] |
368 |
- |
369 |
-+ trees[root].pop("disp_parent") |
370 |
- return selected_atoms |
371 |
- |
372 |
- def _show_unsatisfied_dep(self, root, atom, myparent=None, arg=None, |
373 |
-@@ -4633,6 +4642,37 @@ |
374 |
- for x in blockers: |
375 |
- print(x) |
376 |
- |
377 |
-+ # print readonly selected packages |
378 |
-+ if len(ro_selected) > 0: |
379 |
-+ out.write("\n%s\n\n" % (darkgreen("Packages resolved from readonly installations:"))) |
380 |
-+ |
381 |
-+ ro_mismatch_warning = False |
382 |
-+ ro_dupcheck = [] |
383 |
-+ for x in ro_selected: |
384 |
-+ tmp_type = x["type"].replace("END","") |
385 |
-+ while len(tmp_type) < 4: |
386 |
-+ tmp_type += " " |
387 |
-+ if str(x["atom"]) not in ro_dupcheck: |
388 |
-+ out.write("[%s %s] %s %s %s (%s by %s)" % (teal("readonly"), |
389 |
-+ green(tmp_type), green(str(x["matches"][0])), yellow("from"), |
390 |
-+ blue(x["ro_root"]), turquoise(str(x["atom"])), green(x["parent"].cpv))) |
391 |
-+ |
392 |
-+ ro_dupcheck.append(str(x["atom"])) |
393 |
-+ |
394 |
-+ if x["host_mismatch"]: |
395 |
-+ ro_mismatch_warning = True |
396 |
-+ out.write(" %s\n" % (red("**"))) |
397 |
-+ else: |
398 |
-+ out.write("\n") |
399 |
-+ |
400 |
-+ if ro_mismatch_warning: |
401 |
-+ out.write("\n%s:" % (red("**"))) |
402 |
-+ out.write(yellow(" WARNING: packages marked with ** have been resolved as a\n")) |
403 |
-+ out.write(yellow(" runtime dependency, but the CHOST variable for the parent\n")) |
404 |
-+ out.write(yellow(" and dependency package don't match. This could cause link\n")) |
405 |
-+ out.write(yellow(" errors. It is recommended to use RDEPEND READONLY_EPREFIX's\n")) |
406 |
-+ out.write(yellow(" only with matching CHOST portage instances.\n")) |
407 |
-+ |
408 |
- if verbosity == 3: |
409 |
- print() |
410 |
- print(counters) |
411 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/portage/__init__.py prefix-portage-2.2.00.15801/pym/portage/__init__.py |
412 |
---- prefix-portage-2.2.00.15801.orig/pym/portage/__init__.py 2010-03-11 10:39:16 +0100 |
413 |
-+++ prefix-portage-2.2.00.15801/pym/portage/__init__.py 2010-03-11 10:40:37 +0100 |
414 |
-@@ -85,7 +85,7 @@ |
415 |
- 'portage.dep:best_match_to_list,dep_getcpv,dep_getkey,' + \ |
416 |
- 'flatten,get_operator,isjustname,isspecific,isvalidatom,' + \ |
417 |
- 'match_from_list,match_to_list', |
418 |
-- 'portage.dep.dep_check:dep_check,dep_eval,dep_wordreduce,dep_zapdeps', |
419 |
-+ 'portage.dep.dep_check:dep_check,dep_eval,dep_wordreduce,dep_zapdeps,dep_wordreduce_readonly', |
420 |
- 'portage.eclass_cache', |
421 |
- 'portage.env.loaders', |
422 |
- 'portage.exception', |
423 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/portage/dbapi/vartree.py prefix-portage-2.2.00.15801/pym/portage/dbapi/vartree.py |
424 |
---- prefix-portage-2.2.00.15801.orig/pym/portage/dbapi/vartree.py 2010-03-11 10:39:16 +0100 |
425 |
-+++ prefix-portage-2.2.00.15801/pym/portage/dbapi/vartree.py 2010-03-11 10:38:21 +0100 |
426 |
-@@ -1837,9 +1837,20 @@ |
427 |
- self._counter_path = os.path.join(root, |
428 |
- CACHE_PATH, "counter") |
429 |
- |
430 |
-+ plibreg_path = os.path.join(self.root, PRIVATE_PATH, "preserved_libs_registry") |
431 |
-+ |
432 |
-+ if vartree: |
433 |
-+ self._kill_eprefix = vartree._kill_eprefix |
434 |
-+ else: |
435 |
-+ self._kill_eprefix = False |
436 |
-+ |
437 |
-+ if self._kill_eprefix: |
438 |
-+ self._aux_cache_filename = os.path.join(self.root, self._aux_cache_filename.replace(EPREFIX, "")) |
439 |
-+ self._counter_path = os.path.join(self.root, self._counter_path.replace(EPREFIX, "")) |
440 |
-+ plibreg_path = os.path.join(self.root, plibreg_path.replace(EPREFIX, "")) |
441 |
-+ |
442 |
- try: |
443 |
-- self.plib_registry = PreservedLibsRegistry(self.root, |
444 |
-- os.path.join(self.root, PRIVATE_PATH, "preserved_libs_registry")) |
445 |
-+ self.plib_registry = PreservedLibsRegistry(self.root, plibreg_path) |
446 |
- except PermissionDenied: |
447 |
- # apparently this user isn't allowed to access PRIVATE_PATH |
448 |
- self.plib_registry = None |
449 |
-@@ -1861,6 +1872,9 @@ |
450 |
- # This is an optimized hotspot, so don't use unicode-wrapped |
451 |
- # os module and don't use os.path.join(). |
452 |
- rValue = self.root + _os.sep + VDB_PATH + _os.sep + mykey |
453 |
-+ if self._kill_eprefix: |
454 |
-+ rValue = rValue.replace(EPREFIX, "") |
455 |
-+ |
456 |
- if filename is not None: |
457 |
- # If filename is always relative, we can do just |
458 |
- # rValue += _os.sep + filename |
459 |
-@@ -2012,6 +2026,9 @@ |
460 |
- returnme = [] |
461 |
- basepath = os.path.join(self.root, VDB_PATH) + os.path.sep |
462 |
- |
463 |
-+ if self._kill_eprefix: |
464 |
-+ basepath = os.path.join(self.root, basepath.replace(EPREFIX, "")) |
465 |
-+ |
466 |
- if use_cache: |
467 |
- from portage import listdir |
468 |
- else: |
469 |
-@@ -2102,7 +2119,12 @@ |
470 |
- return list(self._iter_match(mydep, |
471 |
- self.cp_list(mydep.cp, use_cache=use_cache))) |
472 |
- try: |
473 |
-- curmtime = os.stat(os.path.join(self.root, VDB_PATH, mycat)).st_mtime |
474 |
-+ _tmp_path = os.path.join(self.root, VDB_PATH, mycat) |
475 |
-+ |
476 |
-+ if self._kill_eprefix: |
477 |
-+ _tmp_path = os.path.join(self.root, _tmp_path.replace(EPREFIX, "")) |
478 |
-+ |
479 |
-+ curmtime = os.stat(_tmp_path).st_mtime |
480 |
- except (IOError, OSError): |
481 |
- curmtime=0 |
482 |
- |
483 |
-@@ -2689,7 +2711,7 @@ |
484 |
- class vartree(object): |
485 |
- "this tree will scan a var/db/pkg database located at root (passed to init)" |
486 |
- def __init__(self, root="/", virtual=None, clone=None, categories=None, |
487 |
-- settings=None): |
488 |
-+ settings=None, kill_eprefix=False): |
489 |
- if clone: |
490 |
- writemsg("vartree.__init__(): deprecated " + \ |
491 |
- "use of clone parameter\n", noiselevel=-1) |
492 |
-@@ -2698,6 +2720,7 @@ |
493 |
- self.populated = 1 |
494 |
- from portage import config |
495 |
- self.settings = config(clone=clone.settings) |
496 |
-+ self._kill_eprefix = clone._kill_eprefix |
497 |
- else: |
498 |
- self.root = root[:] |
499 |
- if settings is None: |
500 |
-@@ -2705,6 +2728,7 @@ |
501 |
- self.settings = settings |
502 |
- if categories is None: |
503 |
- categories = settings.categories |
504 |
-+ self._kill_eprefix=kill_eprefix |
505 |
- self.dbapi = vardbapi(self.root, categories=categories, |
506 |
- settings=settings, vartree=self) |
507 |
- self.populated = 1 |
508 |
-@@ -2736,6 +2760,10 @@ |
509 |
- raise |
510 |
- except Exception as e: |
511 |
- mydir = os.path.join(self.root, VDB_PATH, mycpv) |
512 |
-+ |
513 |
-+ if self._kill_eprefix: |
514 |
-+ mydir = os.path.join(self.root, mydir.replace(EPREFIX, "")) |
515 |
-+ |
516 |
- writemsg(_("\nParse Error reading PROVIDE and USE in '%s'\n") % mydir, |
517 |
- noiselevel=-1) |
518 |
- if mylines: |
519 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/portage/dep/dep_check.py prefix-portage-2.2.00.15801/pym/portage/dep/dep_check.py |
520 |
---- prefix-portage-2.2.00.15801.orig/pym/portage/dep/dep_check.py 2010-03-11 10:39:16 +0100 |
521 |
-+++ prefix-portage-2.2.00.15801/pym/portage/dep/dep_check.py 2010-03-11 10:40:52 +0100 |
522 |
-@@ -244,6 +244,95 @@ |
523 |
- return 0 |
524 |
- return 1 |
525 |
- |
526 |
-+ro_trees={} |
527 |
-+ro_vartrees={} |
528 |
-+ro_selected=[] |
529 |
-+ |
530 |
-+def dep_match_readonly_roots(settings, atom, dep_type, parent=None): |
531 |
-+ if len(ro_trees) < len(settings.readonly_roots): |
532 |
-+ # MDUFT: create additional vartrees for every readonly root here. |
533 |
-+ # the ro_vartrees instances are created below as they are needed to |
534 |
-+ # avoid reading vartrees of portage instances which aren't required |
535 |
-+ # while resolving this dependencies. |
536 |
-+ for type in ("DEPEND","RDEPEND", "PDEPEND"): |
537 |
-+ ro_trees[type] = [] |
538 |
-+ |
539 |
-+ for ro_root, ro_dep_types in settings.readonly_roots.items(): |
540 |
-+ if type in ro_dep_types: |
541 |
-+ ro_trees[type].append(ro_root) |
542 |
-+ |
543 |
-+ if len(ro_trees) == 0: |
544 |
-+ return [] |
545 |
-+ |
546 |
-+ matches = [] |
547 |
-+ |
548 |
-+ for ro_root in ro_trees[dep_type]: |
549 |
-+ if not ro_vartrees.has_key(ro_root): |
550 |
-+ # target_root=ro_root ok? or should it be the real target_root? |
551 |
-+ _tmp_settings = portage.config(config_root=ro_root, target_root=ro_root, |
552 |
-+ config_incrementals=portage.const.INCREMENTALS) |
553 |
-+ |
554 |
-+ ro_vartrees[ro_root] = portage.vartree(root=ro_root, |
555 |
-+ categories=_tmp_settings.categories, |
556 |
-+ settings=_tmp_settings, kill_eprefix=True) |
557 |
-+ |
558 |
-+ ro_matches = ro_vartrees[ro_root].dbapi.match(atom) |
559 |
-+ |
560 |
-+ if ro_matches: |
561 |
-+ ro_host_mismatch = False |
562 |
-+ if dep_type is "RDEPEND": |
563 |
-+ # we need to assure binary compatability, so it needs to be |
564 |
-+ # the same CHOST! But how? for now i cannot do anything... |
565 |
-+ if parent and parent.metadata["CHOST"] != ro_vartrees[ro_root].settings.get("CHOST", ""): |
566 |
-+ # provocate a big fat warning in the list of external packages. |
567 |
-+ ro_host_mismatch = True |
568 |
-+ pass |
569 |
-+ |
570 |
-+ matches.append({ "ro_root": ro_root, "atom": atom, "matches": ro_matches, |
571 |
-+ "type": dep_type, "parent": parent, "host_mismatch": ro_host_mismatch }) |
572 |
-+ |
573 |
-+ return matches |
574 |
-+ |
575 |
-+def dep_wordreduce_readonly(reduced, unreduced, settings, dep_type, parent): |
576 |
-+ for mypos, token in enumerate(unreduced): |
577 |
-+ # recurse if it's a list. |
578 |
-+ if isinstance(reduced[mypos], list): |
579 |
-+ reduced[mypos] = dep_wordreduce_readonly(reduced[mypos], |
580 |
-+ unreduced[mypos], settings, dep_type, parent) |
581 |
-+ # do nothing if it's satisfied already. |
582 |
-+ elif not reduced[mypos]: |
583 |
-+ ro_matches = dep_match_readonly_roots(settings, unreduced[mypos], dep_type, parent) |
584 |
-+ |
585 |
-+ if ro_matches: |
586 |
-+ # TODO: select a match if there are more than one? |
587 |
-+ # for now, the first match is taken... |
588 |
-+ ro_selected.append(ro_matches[0]) |
589 |
-+ reduced[mypos] = True |
590 |
-+ |
591 |
-+ return reduced |
592 |
-+ |
593 |
-+# this may be better placed somewhere else, but i put it here for now, to |
594 |
-+# keep all functions in the patch on one big heap. |
595 |
-+def readonly_pathmatch_any(settings, path): |
596 |
-+ path = path.lstrip('/') |
597 |
-+ # first try locally, and match that if it exists. |
598 |
-+ if os.path.exists(os.path.join(EPREFIX,path)): |
599 |
-+ return os.path.join(EPREFIX,path) |
600 |
-+ |
601 |
-+ # after that try all readonly roots where DEPEND is allowed. this makes |
602 |
-+ # sure that executing binaries is possible from there. |
603 |
-+ for ro_root, ro_deps in settings.readonly_roots.items(): |
604 |
-+ if "DEPEND" in ro_deps: |
605 |
-+ print(" --- checking %s --- " % (os.path.join(ro_root,path))) |
606 |
-+ if os.path.exists(os.path.join(ro_root,path)): |
607 |
-+ return os.path.join(ro_root,path) |
608 |
-+ break |
609 |
-+ |
610 |
-+ # as a fallback make the string the same as it was originally. |
611 |
-+ # even though this path doesn't exist. |
612 |
-+ return os.path.join(EPREFIX,path) |
613 |
-+ |
614 |
-+ |
615 |
- def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): |
616 |
- """ |
617 |
- Takes an unreduced and reduced deplist and removes satisfied dependencies. |
618 |
-@@ -501,7 +590,7 @@ |
619 |
- assert(False) # This point should not be reachable |
620 |
- |
621 |
- def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, |
622 |
-- use_cache=1, use_binaries=0, myroot="/", trees=None): |
623 |
-+ use_cache=1, use_binaries=0, myroot="/", trees=None , dep_type=None): |
624 |
- """Takes a depend string and parses the condition.""" |
625 |
- edebug = mysettings.get("PORTAGE_DEBUG", None) == "1" |
626 |
- #check_config_instance(mysettings) |
627 |
-@@ -579,6 +668,14 @@ |
628 |
- writemsg("mysplit: %s\n" % (mysplit), 1) |
629 |
- writemsg("mysplit2: %s\n" % (mysplit2), 1) |
630 |
- |
631 |
-+ if dep_type is not None: |
632 |
-+ mysplit2=dep_wordreduce_readonly(unreduced=mysplit[:], |
633 |
-+ reduced=mysplit2, settings=mysettings, |
634 |
-+ dep_type=dep_type, parent=trees[myroot].get("disp_parent")) |
635 |
-+ |
636 |
-+ writemsg("\n", 1) |
637 |
-+ writemsg("mysplit2 after readonly reduce: %s\n" % (mysplit2), 1) |
638 |
-+ |
639 |
- try: |
640 |
- selected_atoms = dep_zapdeps(mysplit, mysplit2, myroot, |
641 |
- use_binaries=use_binaries, trees=trees) |
642 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/portage/exception.py prefix-portage-2.2.00.15801/pym/portage/exception.py |
643 |
---- prefix-portage-2.2.00.15801.orig/pym/portage/exception.py 2010-03-11 10:39:16 +0100 |
644 |
-+++ prefix-portage-2.2.00.15801/pym/portage/exception.py 2010-03-11 10:38:21 +0100 |
645 |
-@@ -128,3 +128,6 @@ |
646 |
- class UntrustedSignature(SignatureException): |
647 |
- """Signature was not certified to the desired security level""" |
648 |
- |
649 |
-+class InvalidReadonlyERoot(PortageException): |
650 |
-+ """Readonly EROOT definition string in make.conf invalid.""" |
651 |
-+ |
652 |
-diff -ru prefix-portage-2.2.00.15801.orig/pym/portage/package/ebuild/config.py prefix-portage-2.2.00.15801/pym/portage/package/ebuild/config.py |
653 |
---- prefix-portage-2.2.00.15801.orig/pym/portage/package/ebuild/config.py 2010-03-11 10:39:16 +0100 |
654 |
-+++ prefix-portage-2.2.00.15801/pym/portage/package/ebuild/config.py 2010-03-11 10:38:21 +0100 |
655 |
-@@ -427,6 +427,7 @@ |
656 |
- self.prevmaskdict = copy.deepcopy(clone.prevmaskdict) |
657 |
- self.pprovideddict = copy.deepcopy(clone.pprovideddict) |
658 |
- self.features = copy.deepcopy(clone.features) |
659 |
-+ self.readonly_roots = copy.deepcopy(clone.readonly_roots) |
660 |
- |
661 |
- self._accept_license = copy.deepcopy(clone._accept_license) |
662 |
- self._plicensedict = copy.deepcopy(clone._plicensedict) |
663 |
-@@ -1017,6 +1018,50 @@ |
664 |
- _validate_cache_for_unsupported_eapis = False |
665 |
- _glep_55_enabled = True |
666 |
- |
667 |
-+ # expand READONLY_EPREFIX to a list of all readonly portage instances |
668 |
-+ # all the way down to the last one. beware that ATM a deeper instance |
669 |
-+ # in the chain can provide more than the toplevel! this means that |
670 |
-+ # if you only inherit DEPENDS from one instance, that instance may |
671 |
-+ # inherit RDEPENDs from another one, making the top-level instance |
672 |
-+ # inherit RDEPENDs from there too - even if the intermediate prefix |
673 |
-+ # does not do this. |
674 |
-+ self.readonly_roots = {} |
675 |
-+ my_ro_current_instance = config_root |
676 |
-+ my_ro_widest_depset = set(['DEPEND', 'RDEPEND', 'PDEPEND']) |
677 |
-+ |
678 |
-+ while True: |
679 |
-+ my_ro_current_make_conf_file = os.path.join(my_ro_current_instance,MAKE_CONF_FILE.lstrip(os.path.sep)) |
680 |
-+ |
681 |
-+ if os.path.exists(my_ro_current_make_conf_file): |
682 |
-+ my_ro_cfg = getconfig(my_ro_current_make_conf_file, tolerant=1) |
683 |
-+ |
684 |
-+ if my_ro_cfg.has_key("READONLY_EPREFIX"): |
685 |
-+ if not my_ro_cfg["READONLY_EPREFIX"].find(":"): |
686 |
-+ raise portage.exception.InvalidReadonlyERoot("ERROR: malformed READONLY_EPREFIX in %s" % (my_ro_current_make_conf_file)) |
687 |
-+ |
688 |
-+ (my_ro_cfg_root,my_ro_cfg_root_deps) = my_ro_cfg["READONLY_EPREFIX"].rsplit(":",1) |
689 |
-+ |
690 |
-+ if not os.path.exists(my_ro_cfg_root): |
691 |
-+ raise portage.exception.InvalidReadonlyERoot("ERROR: malformed READONLY_EPREFIX in %s: path does not exist!" % (my_ro_current_instance)) |
692 |
-+ |
693 |
-+ if self.readonly_roots.has_key(my_ro_cfg_root): |
694 |
-+ raise portage.exception.InvalidReadonlyERoot("ERROR: circular READONLY_EPREFIX's in %s. %s already checked for %s" % (my_ro_current_make_conf_file, my_ro_cfg_root, self.readonly_roots[my_ro_cfg_root])) |
695 |
-+ |
696 |
-+ if my_ro_cfg_root == config_root: |
697 |
-+ raise portage.exception.InvalidReadonlyERoot("ERROR: cannot add this instance as READONLY_EPREFIX in %s." % (my_ro_current_make_conf_file)) |
698 |
-+ |
699 |
-+ # intersect the widest depset with the current one to strip down |
700 |
-+ # the allowed dependency resolution to not be wider than the |
701 |
-+ # next higher one. this way we can prevent for a given prefix |
702 |
-+ # to resolve RDEPENDs from a prefix with a different CHOST that |
703 |
-+ # is a few levels deeper in the chain. |
704 |
-+ my_ro_widest_depset = set(my_ro_cfg_root_deps.split(",")) & my_ro_widest_depset |
705 |
-+ self.readonly_roots[my_ro_cfg_root] = my_ro_widest_depset |
706 |
-+ my_ro_current_instance = my_ro_cfg_root |
707 |
-+ continue |
708 |
-+ |
709 |
-+ break |
710 |
-+ |
711 |
- for k in self._case_insensitive_vars: |
712 |
- if k in self: |
713 |
- self[k] = self[k].lower() |
714 |
-@@ -2574,6 +2619,10 @@ |
715 |
- if eapi not in ("0", "1", "2", "3", "3_pre2"): |
716 |
- mydict.pop("AA", None) |
717 |
- |
718 |
-+ # populate with PORTAGE_READONLY_EPREFIXES |
719 |
-+ if self.readonly_roots and len(self.readonly_roots) > 0: |
720 |
-+ mydict["PORTAGE_READONLY_EPREFIXES"] = ':'.join(self.readonly_roots) |
721 |
-+ |
722 |
- # Prefix variables are supported starting with EAPI 3. |
723 |
- # but during transition, we just support them anywhere |
724 |
- #if phase == 'depend' or eapi in (None, "0", "1", "2"): |
725 |
|
726 |
diff --git a/sys-apps/portage/files/portage-2.2.01.18826-aix-preservelibs.patch b/sys-apps/portage/files/portage-2.2.01.18826-aix-preservelibs.patch |
727 |
deleted file mode 100644 |
728 |
index 002f11ce42..0000000000 |
729 |
--- a/sys-apps/portage/files/portage-2.2.01.18826-aix-preservelibs.patch |
730 |
+++ /dev/null |
731 |
@@ -1,32 +0,0 @@ |
732 |
-Need to list executables in NEEDED.XCOFF.1 too for preserve-libs. |
733 |
- |
734 |
-Do not prepend filenames with '.' twice when calculating the preserve-lib |
735 |
-helper-filenames. Can't say which commit triggers this problem, as this |
736 |
-did work before. |
737 |
---- bin/misc-functions.sh.orig 2011-06-16 17:15:47 +0200 |
738 |
-+++ bin/misc-functions.sh 2011-06-16 17:17:13 +0200 |
739 |
-@@ -1178,7 +1178,9 @@ |
740 |
- fi |
741 |
- prev_FILE=${FILE} |
742 |
- |
743 |
-- [[ " ${FLAGS} " == *" SHROBJ "* ]] || continue |
744 |
-+ # shared objects have both EXEC and SHROBJ flags, |
745 |
-+ # while executables have EXEC flag only. |
746 |
-+ [[ " ${FLAGS} " == *" EXEC "* ]] || continue |
747 |
- |
748 |
- # Make sure we disallow insecure RUNPATH's |
749 |
- # Don't want paths that point to the tree where the package was built |
750 |
---- pym/portage/util/_dyn_libs/LinkageMapXCoff.py.orig 2011-06-17 11:26:45 +0200 |
751 |
-+++ pym/portage/util/_dyn_libs/LinkageMapXCoff.py 2011-06-17 11:32:13 +0200 |
752 |
-@@ -255,7 +255,11 @@ |
753 |
- def as_contentmember(obj): |
754 |
- if obj.endswith("]"): |
755 |
- if obj.find("/") >= 0: |
756 |
-+ if obj[obj.rfind("/")+1] == ".": |
757 |
-+ return obj |
758 |
- return obj[:obj.rfind("/")] + "/." + obj[obj.rfind("/")+1:] |
759 |
-+ if obj[0] == ".": |
760 |
-+ return obj |
761 |
- return "." + obj |
762 |
- return obj |
763 |
- |
764 |
|
765 |
diff --git a/sys-apps/portage/files/portage-2.2.01.19247-aix-preserve-libs.patch b/sys-apps/portage/files/portage-2.2.01.19247-aix-preserve-libs.patch |
766 |
deleted file mode 100644 |
767 |
index ecc42fd07c..0000000000 |
768 |
--- a/sys-apps/portage/files/portage-2.2.01.19247-aix-preserve-libs.patch |
769 |
+++ /dev/null |
770 |
@@ -1,163 +0,0 @@ |
771 |
-Drop code identical to and inheritable from LinkageMapELF. |
772 |
- |
773 |
-Update code that is duplicated from LinkageMapELF. |
774 |
- |
775 |
-Actually query information for /all/ preserved shared objects, |
776 |
-not the last one only. |
777 |
-Maybe the KeyError-problem is gone for AIX due to this fix, |
778 |
-even if that workaround was inherited from LinkageMapELF. |
779 |
- |
780 |
-Deal with existing helper files in a binpkg created with 'quickpkg'. |
781 |
-Eventually improve performance when creating helper files. |
782 |
- |
783 |
---- pym/portage/util/_dyn_libs/LinkageMapXCoff.py.orig 2011-09-14 16:02:34 +0200 |
784 |
-+++ pym/portage/util/_dyn_libs/LinkageMapXCoff.py 2011-09-14 16:34:43 +0200 |
785 |
-@@ -71,21 +71,10 @@ |
786 |
- # filesystem. |
787 |
- return os.path.realpath(abs_path) |
788 |
- # Return a tuple of the device and inode, as well as the basename, |
789 |
-- # because of hardlinks the device and inode might be identical. |
790 |
-+ # because of hardlinks (notably for the .libNAME[shr.o] helpers) |
791 |
-+ # the device and inode might be identical. |
792 |
- return (object_stat.st_dev, object_stat.st_ino, os.path.basename(abs_path.rstrip(os.sep))) |
793 |
- |
794 |
-- def file_exists(self): |
795 |
-- """ |
796 |
-- Determine if the file for this key exists on the filesystem. |
797 |
-- |
798 |
-- @rtype: Boolean |
799 |
-- @return: |
800 |
-- 1. True if the file exists. |
801 |
-- 2. False if the file does not exist or is a broken symlink. |
802 |
-- |
803 |
-- """ |
804 |
-- return isinstance(self._key, tuple) |
805 |
-- |
806 |
- class _LibGraphNode(_ObjectKey): |
807 |
- __slots__ = ("alt_paths",) |
808 |
- |
809 |
-@@ -175,10 +164,9 @@ |
810 |
- continue |
811 |
- plibs.update((x, cpv) for x in items) |
812 |
- if plibs: |
813 |
-- for x in plibs: |
814 |
-- args = [BASH_BINARY, "-c", ':' |
815 |
-- + '; member="' + x + '"' |
816 |
-- + '; archive=${member}' |
817 |
-+ args = [BASH_BINARY , "-c" , ':' |
818 |
-+ + '; for member in "$@"' |
819 |
-+ + '; do archive=${member}' |
820 |
- + '; if [[ ${member##*/} == .*"["*"]" ]]' |
821 |
- + '; then member=${member%/.*}/${member##*/.}' |
822 |
- + '; archive=${member%[*}' |
823 |
-@@ -195,9 +183,21 @@ |
824 |
- + '; done' |
825 |
- + '; [[ -n ${MEMBER} ]] && MEMBER="[${MEMBER}]"' |
826 |
- + '; [[ " ${FLAGS} " == *" SHROBJ "* ]] && soname=${FILE##*/}${MEMBER} || soname=' |
827 |
-- + '; echo "${FORMAT##* }${FORMAT%%-*};${FILE#${ROOT%/}}${MEMBER};${soname};${RUNPATH};${needed}"' |
828 |
-- + '; [[ -z ${member} && -n ${MEMBER} ]] && echo "${FORMAT##* }${FORMAT%%-*};${FILE#${ROOT%/}};${FILE##*/};;"' |
829 |
-- ] |
830 |
-+ + '; case ${member:+y}:${MEMBER:+y}' |
831 |
-+ # member requested, member found: show shared archive member |
832 |
-+ + ' in y:y) echo "${FORMAT##* }${FORMAT%%-*};${FILE#${ROOT%/}}${MEMBER};${soname};${RUNPATH};${needed}"' |
833 |
-+ # no member requested, member found: show archive |
834 |
-+ + ' ;; :y) echo "${FORMAT##* }${FORMAT%%-*};${FILE#${ROOT%/}};${FILE##*/};;"' |
835 |
-+ # no member requested, no member found: show standalone shared object |
836 |
-+ + ' ;; : ) echo "${FORMAT##* }${FORMAT%%-*};${FILE#${ROOT%/}};${FILE##*/};${RUNPATH};${needed}"' |
837 |
-+ # member requested, no member found: ignore archive replaced by standalone shared object |
838 |
-+ + ' ;; y: )' |
839 |
-+ + ' ;; esac' |
840 |
-+ + '; done' |
841 |
-+ , 'aixdll-query' |
842 |
-+ ] |
843 |
-+ args.extend(os.path.join(root, x.lstrip("." + os.sep)) \ |
844 |
-+ for x in plibs) |
845 |
- try: |
846 |
- proc = subprocess.Popen(args, stdout=subprocess.PIPE) |
847 |
- except EnvironmentError as e: |
848 |
-@@ -228,17 +228,8 @@ |
849 |
- owner = plibs.pop(fields[1], None) |
850 |
- lines.append((owner, "aixdll-query", ";".join(fields))) |
851 |
- proc.wait() |
852 |
-+ proc.stdout.close() |
853 |
- |
854 |
-- if plibs: |
855 |
-- # Preserved libraries that did not appear in the bash |
856 |
-- # aixdll-query code output. This is known to happen with |
857 |
-- # statically linked libraries. Generate dummy lines for |
858 |
-- # these, so we can assume that every preserved library has |
859 |
-- # an entry in self._obj_properties. This is important in |
860 |
-- # order to prevent findConsumers from raising an unwanted |
861 |
-- # KeyError. |
862 |
-- for x, cpv in plibs.items(): |
863 |
-- lines.append((cpv, "plibs", ";".join(['', x, '', '', '']))) |
864 |
- # Share identical frozenset instances when available, |
865 |
- # in order to conserve memory. |
866 |
- frozensets = {} |
867 |
-@@ -318,23 +309,4 @@ |
868 |
- soname_node.providers = tuple(set(soname_node.providers)) |
869 |
- soname_node.consumers = tuple(set(soname_node.consumers)) |
870 |
- |
871 |
-- def getSoname(self, obj): |
872 |
-- """ |
873 |
-- Return the soname associated with an object. |
874 |
-- |
875 |
-- @param obj: absolute path to an object |
876 |
-- @type obj: string (example: '/usr/bin/bar') |
877 |
-- @rtype: string |
878 |
-- @return: soname as a string |
879 |
-- |
880 |
-- """ |
881 |
-- if not self._libs: |
882 |
-- self.rebuild() |
883 |
-- if isinstance(obj, self._ObjectKey): |
884 |
-- obj_key = obj |
885 |
-- if obj_key not in self._obj_properties: |
886 |
-- raise KeyError("%s not in object list" % obj_key) |
887 |
-- return self._obj_properties[obj_key].soname |
888 |
-- if obj not in self._obj_key_cache: |
889 |
-- raise KeyError("%s not in object list" % obj) |
890 |
-- return self._obj_properties[self._obj_key_cache[obj]].soname |
891 |
-+ pass |
892 |
---- bin/misc-functions.sh.orig 2011-09-14 17:53:45 +0200 |
893 |
-+++ bin/misc-functions.sh 2011-09-14 18:21:01 +0200 |
894 |
-@@ -1297,7 +1297,7 @@ |
895 |
- else |
896 |
- die "cannot find where to use 'ar' and 'strip' from" |
897 |
- fi |
898 |
-- local archives_members= archives=() chmod400files=() |
899 |
-+ local archives_members= archives=() helperfiles=() |
900 |
- local archive_member soname runpath needed archive contentmember |
901 |
- while read archive_member; do |
902 |
- archive_member=${archive_member#*;${EPREFIX}/} # drop "^type;EPREFIX/" |
903 |
-@@ -1321,13 +1321,24 @@ |
904 |
- # portage does os.lstat() on merged files every now |
905 |
- # and then, so keep stamp-files for archive members |
906 |
- # around to get the preserve-libs feature working. |
907 |
-- { echo "Please leave this file alone, it is an important helper" |
908 |
-- echo "for portage to implement the 'preserve-libs' feature on AIX." |
909 |
-- } > "${ED}${contentmember}" || die "cannot create ${contentmember}" |
910 |
-- chmod400files[${#chmod400files[@]}]=${ED}${contentmember} |
911 |
-+ helperfiles[${#helperfiles[@]}]=${ED}${contentmember} |
912 |
- done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED.XCOFF.1 |
913 |
-- [[ ${#chmod400files[@]} == 0 ]] || |
914 |
-- chmod 0400 "${chmod400files[@]}" || die "cannot chmod ${chmod400files[@]}" |
915 |
-+ if [[ ${#helperfiles[@]} > 0 ]]; then |
916 |
-+ rm -f "${helperfiles[@]}" || die "cannot prune ${helperfiles[@]}" |
917 |
-+ local f prev= |
918 |
-+ for f in "${helperfiles[@]}" |
919 |
-+ do |
920 |
-+ if [[ -z ${prev} ]]; then |
921 |
-+ { echo "Please leave this file alone, it is an important helper" |
922 |
-+ echo "for portage to implement the 'preserve-libs' feature on AIX." |
923 |
-+ } > "${f}" || die "cannot create ${f}" |
924 |
-+ chmod 0400 "${f}" || die "cannot chmod ${f}" |
925 |
-+ prev=${f} |
926 |
-+ else |
927 |
-+ ln "${prev}" "${f}" || die "cannot create hardlink ${f}" |
928 |
-+ fi |
929 |
-+ done |
930 |
-+ fi |
931 |
- |
932 |
- local preservemembers libmetadir prunedirs=() |
933 |
- local FILE MEMBER FLAGS |
934 |
|
935 |
diff --git a/sys-apps/portage/files/portage-2.2.10.1-brokentty-more-platforms.patch b/sys-apps/portage/files/portage-2.2.10.1-brokentty-more-platforms.patch |
936 |
deleted file mode 100644 |
937 |
index bd7ab7ffcb..0000000000 |
938 |
--- a/sys-apps/portage/files/portage-2.2.10.1-brokentty-more-platforms.patch |
939 |
+++ /dev/null |
940 |
@@ -1,35 +0,0 @@ |
941 |
-https://gitweb.gentoo.org/proj/portage.git/commit/?h=prefix&id=9607fb432f1333774bf6994166e2fa7e96616b6d |
942 |
- |
943 |
-From 9556da42590eecaafe126473aff04c2cee59d833 Mon Sep 17 00:00:00 2001 |
944 |
-From: Michael Haubenwallner <michael.haubenwallner@××××××××××××.com> |
945 |
-Date: Thu, 18 Jun 2015 18:39:58 +0200 |
946 |
-Subject: [PATCH] disable openpty on more unices |
947 |
- |
948 |
---- |
949 |
- pym/portage/util/_pty.py | 8 ++++---- |
950 |
- 1 file changed, 4 insertions(+), 4 deletions(-) |
951 |
- |
952 |
-diff --git a/pym/portage/util/_pty.py b/pym/portage/util/_pty.py |
953 |
-index 11c8b92..a92f575 100644 |
954 |
---- a/pym/portage/util/_pty.py |
955 |
-+++ b/pym/portage/util/_pty.py |
956 |
-@@ -9,12 +9,12 @@ from portage import os |
957 |
- from portage.output import get_term_size, set_term_size |
958 |
- from portage.util import writemsg |
959 |
- |
960 |
--# Disable the use of openpty on Solaris as it seems Python's openpty |
961 |
--# implementation doesn't play nice on Solaris with Portage's |
962 |
--# behaviour causing hangs/deadlocks. |
963 |
-+# Disable the use of openpty on Solaris (and others) as it seems Python's |
964 |
-+# openpty implementation doesn't play nice with Portage's behaviour, |
965 |
-+# causing hangs/deadlocks. |
966 |
- # Additional note for the future: on Interix, pipes do NOT work, so |
967 |
- # _disable_openpty on Interix must *never* be True |
968 |
--_disable_openpty = platform.system() in ("SunOS","FreeMiNT",) |
969 |
-+_disable_openpty = platform.system() in ("AIX","FreeMiNT","HP-UX","SunOS",) |
970 |
- |
971 |
- _fbsd_test_pty = platform.system() == 'FreeBSD' |
972 |
- |
973 |
--- |
974 |
-2.0.5 |
975 |
- |
976 |
|
977 |
diff --git a/sys-apps/portage/files/portage-2.2.10.1-case-insensitive-fs.patch b/sys-apps/portage/files/portage-2.2.10.1-case-insensitive-fs.patch |
978 |
deleted file mode 100644 |
979 |
index 7f69cd64b5..0000000000 |
980 |
--- a/sys-apps/portage/files/portage-2.2.10.1-case-insensitive-fs.patch |
981 |
+++ /dev/null |
982 |
@@ -1,375 +0,0 @@ |
983 |
-From fc3e0fafac889586ad85b12f414bcd10d30d7021 Mon Sep 17 00:00:00 2001 |
984 |
-From: Zac Medico <zmedico@g.o> |
985 |
-Date: Thu, 2 Oct 2014 10:57:11 -0700 |
986 |
-Subject: [PATCH] FEATURES=case-insensitive-fs for bug #524236 |
987 |
- |
988 |
-When case-insensitive-fs is enabled in FEATURES, the dblink.isowner |
989 |
-method, _owners_db class, and ConfigProtect class will be |
990 |
-case-insensitive. This causes the collision-protect and unmerge code |
991 |
-to behave correctly for a case-insensitive file system. If the file |
992 |
-system is case-insensitive but case-preserving, then case is preserved |
993 |
-in the CONTENTS data of installed packages. |
994 |
- |
995 |
-X-Gentoo-Bug: 524236 |
996 |
-X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=524236 |
997 |
---- |
998 |
- bin/dispatch-conf | 8 +++++++- |
999 |
- bin/etc-update | 14 +++++++++++--- |
1000 |
- bin/portageq | 7 ++++--- |
1001 |
- bin/quickpkg | 4 +++- |
1002 |
- man/make.conf.5 | 4 ++++ |
1003 |
- pym/_emerge/depgraph.py | 4 +++- |
1004 |
- pym/portage/_global_updates.py | 4 +++- |
1005 |
- pym/portage/const.py | 1 + |
1006 |
- pym/portage/dbapi/vartree.py | 32 +++++++++++++++++++++++++++++++- |
1007 |
- pym/portage/update.py | 6 ++++-- |
1008 |
- pym/portage/util/__init__.py | 10 +++++++++- |
1009 |
- 11 files changed, 80 insertions(+), 14 deletions(-) |
1010 |
- |
1011 |
-diff --git a/bin/dispatch-conf b/bin/dispatch-conf |
1012 |
-index fb0a8af..7946415 100755 |
1013 |
---- a/bin/dispatch-conf |
1014 |
-+++ b/bin/dispatch-conf |
1015 |
-@@ -29,6 +29,10 @@ from portage.process import find_binary, spawn |
1016 |
- FIND_EXTANT_CONFIGS = "find '%s' %s -name '._cfg????_%s' ! -name '.*~' ! -iname '.*.bak' -print" |
1017 |
- DIFF_CONTENTS = "diff -Nu '%s' '%s'" |
1018 |
- |
1019 |
-+if "case-insensitive-fs" in portage.settings.features: |
1020 |
-+ FIND_EXTANT_CONFIGS = \ |
1021 |
-+ FIND_EXTANT_CONFIGS.replace("-name '._cfg", "-iname '._cfg") |
1022 |
-+ |
1023 |
- # We need a secure scratch dir and python does silly verbose errors on the use of tempnam |
1024 |
- oldmask = os.umask(0o077) |
1025 |
- SCRATCH_DIR = None |
1026 |
-@@ -144,7 +148,9 @@ class dispatch: |
1027 |
- protect_obj = portage.util.ConfigProtect( |
1028 |
- config_root, config_paths, |
1029 |
- portage.util.shlex_split( |
1030 |
-- portage.settings.get('CONFIG_PROTECT_MASK', ''))) |
1031 |
-+ portage.settings.get('CONFIG_PROTECT_MASK', '')), |
1032 |
-+ case_insensitive = ("case-insensitive-fs" |
1033 |
-+ in portage.settings.features)) |
1034 |
- |
1035 |
- def diff(file1, file2): |
1036 |
- return diffstatusoutput(DIFF_CONTENTS, file1, file2) |
1037 |
-diff --git a/bin/etc-update b/bin/etc-update |
1038 |
-index 1a99231..c27379b 100755 |
1039 |
---- a/bin/etc-update |
1040 |
-+++ b/bin/etc-update |
1041 |
-@@ -67,6 +67,7 @@ scan() { |
1042 |
- mkdir "${TMP}"/files || die "Failed mkdir command!" |
1043 |
- count=0 |
1044 |
- input=0 |
1045 |
-+ local basename |
1046 |
- local find_opts |
1047 |
- local path |
1048 |
- |
1049 |
-@@ -75,13 +76,17 @@ scan() { |
1050 |
- |
1051 |
- if [[ ! -d ${path} ]] ; then |
1052 |
- [[ ! -f ${path} ]] && continue |
1053 |
-- local my_basename="${path##*/}" |
1054 |
-+ basename="${path##*/}" |
1055 |
- path="${path%/*}" |
1056 |
-- find_opts=( -maxdepth 1 -name "._cfg????_${my_basename}" ) |
1057 |
-+ find_opts=( -maxdepth 1 ) |
1058 |
- else |
1059 |
-+ basename=* |
1060 |
- # Do not traverse hidden directories such as .svn or .git. |
1061 |
-- find_opts=( -name '.*' -type d -prune -o -name '._cfg????_*' ) |
1062 |
-+ find_opts=( -name '.*' -type d -prune -o ) |
1063 |
- fi |
1064 |
-+ ${case_insensitive} && \ |
1065 |
-+ find_opts+=( -iname ) || find_opts+=( -name ) |
1066 |
-+ find_opts+=( "._cfg????_${basename}" ) |
1067 |
- find_opts+=( ! -name '.*~' ! -iname '.*.bak' -print ) |
1068 |
- |
1069 |
- if [ ! -w "${path}" ] ; then |
1070 |
-@@ -623,6 +628,7 @@ ${SET_X} && set -x |
1071 |
- type -P portageq >/dev/null || die "missing portageq" |
1072 |
- portage_vars=( |
1073 |
- CONFIG_PROTECT{,_MASK} |
1074 |
-+ FEATURES |
1075 |
- PORTAGE_CONFIGROOT |
1076 |
- PORTAGE_INST_{G,U}ID |
1077 |
- PORTAGE_TMPDIR |
1078 |
-@@ -633,6 +639,8 @@ portage_vars=( |
1079 |
- eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)" envvar -v ${portage_vars[@]}) |
1080 |
- export PORTAGE_TMPDIR |
1081 |
- SCAN_PATHS=${*:-${CONFIG_PROTECT}} |
1082 |
-+[[ " ${FEATURES} " == *" case-insensitive-fs "* ]] && \ |
1083 |
-+ case_insensitive=true || case_insensitive=false |
1084 |
- |
1085 |
- TMP="${PORTAGE_TMPDIR}/etc-update-$$" |
1086 |
- trap "die terminated" SIGTERM |
1087 |
-diff --git a/bin/portageq b/bin/portageq |
1088 |
-index 009f116..552cff6 100755 |
1089 |
---- a/bin/portageq |
1090 |
-+++ b/bin/portageq |
1091 |
-@@ -379,8 +379,8 @@ def is_protected(argv): |
1092 |
- protect = portage.util.shlex_split(settings.get("CONFIG_PROTECT", "")) |
1093 |
- protect_mask = portage.util.shlex_split( |
1094 |
- settings.get("CONFIG_PROTECT_MASK", "")) |
1095 |
-- protect_obj = ConfigProtect(root, protect, protect_mask) |
1096 |
-- |
1097 |
-+ protect_obj = ConfigProtect(root, protect, protect_mask, |
1098 |
-+ case_insensitive = ("case-insensitive-fs" in settings.features)) |
1099 |
- if protect_obj.isprotected(f): |
1100 |
- return 0 |
1101 |
- return 1 |
1102 |
-@@ -414,7 +414,8 @@ def filter_protected(argv): |
1103 |
- protect = portage.util.shlex_split(settings.get("CONFIG_PROTECT", "")) |
1104 |
- protect_mask = portage.util.shlex_split( |
1105 |
- settings.get("CONFIG_PROTECT_MASK", "")) |
1106 |
-- protect_obj = ConfigProtect(root, protect, protect_mask) |
1107 |
-+ protect_obj = ConfigProtect(root, protect, protect_mask, |
1108 |
-+ case_insensitive = ("case-insensitive-fs" in settings.features)) |
1109 |
- |
1110 |
- errors = 0 |
1111 |
- |
1112 |
-diff --git a/bin/quickpkg b/bin/quickpkg |
1113 |
-index cf75791..4d6bc87 100755 |
1114 |
---- a/bin/quickpkg |
1115 |
-+++ b/bin/quickpkg |
1116 |
-@@ -102,7 +102,9 @@ def quickpkg_atom(options, infos, arg, eout): |
1117 |
- if not include_config: |
1118 |
- confprot = ConfigProtect(eroot, |
1119 |
- shlex_split(settings.get("CONFIG_PROTECT", "")), |
1120 |
-- shlex_split(settings.get("CONFIG_PROTECT_MASK", ""))) |
1121 |
-+ shlex_split(settings.get("CONFIG_PROTECT_MASK", "")), |
1122 |
-+ case_insensitive = ("case-insensitive-fs" |
1123 |
-+ in settings.features)) |
1124 |
- def protect(filename): |
1125 |
- if not confprot.isprotected(filename): |
1126 |
- return False |
1127 |
-diff --git a/man/make.conf.5 b/man/make.conf.5 |
1128 |
-index 84e894b..7b7daa4 100644 |
1129 |
---- a/man/make.conf.5 |
1130 |
-+++ b/man/make.conf.5 |
1131 |
-@@ -265,6 +265,10 @@ Build binary packages for just packages in the system set. |
1132 |
- Enable a special progress indicator when \fBemerge\fR(1) is calculating |
1133 |
- dependencies. |
1134 |
- .TP |
1135 |
-+.B case\-insensitive\-fs |
1136 |
-+Use case\-insensitive file name comparisions when merging and unmerging |
1137 |
-+files. |
1138 |
-+.TP |
1139 |
- .B ccache |
1140 |
- Enable portage support for the ccache package. If the ccache dir is not |
1141 |
- present in the user's environment, then portage will default to |
1142 |
-diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
1143 |
-index 5180db5..cae8c32 100644 |
1144 |
---- a/pym/_emerge/depgraph.py |
1145 |
-+++ b/pym/_emerge/depgraph.py |
1146 |
-@@ -7799,7 +7799,9 @@ class depgraph(object): |
1147 |
- settings = self._frozen_config.roots[root].settings |
1148 |
- protect_obj[root] = ConfigProtect(settings["EROOT"], \ |
1149 |
- shlex_split(settings.get("CONFIG_PROTECT", "")), |
1150 |
-- shlex_split(settings.get("CONFIG_PROTECT_MASK", ""))) |
1151 |
-+ shlex_split(settings.get("CONFIG_PROTECT_MASK", "")), |
1152 |
-+ case_insensitive = ("case-insensitive-fs" |
1153 |
-+ in settings.features)) |
1154 |
- |
1155 |
- def write_changes(root, changes, file_to_write_to): |
1156 |
- file_contents = None |
1157 |
-diff --git a/pym/portage/_global_updates.py b/pym/portage/_global_updates.py |
1158 |
-index 17dc080..bb39f7a 100644 |
1159 |
---- a/pym/portage/_global_updates.py |
1160 |
-+++ b/pym/portage/_global_updates.py |
1161 |
-@@ -208,7 +208,9 @@ def _do_global_updates(trees, prev_mtimes, quiet=False, if_mtime_changed=True): |
1162 |
- update_config_files(root, |
1163 |
- shlex_split(mysettings.get("CONFIG_PROTECT", "")), |
1164 |
- shlex_split(mysettings.get("CONFIG_PROTECT_MASK", "")), |
1165 |
-- repo_map, match_callback=_config_repo_match) |
1166 |
-+ repo_map, match_callback = _config_repo_match, |
1167 |
-+ case_insensitive = "case-insensitive-fs" |
1168 |
-+ in mysettings.features) |
1169 |
- |
1170 |
- # The above global updates proceed quickly, so they |
1171 |
- # are considered a single mtimedb transaction. |
1172 |
-diff --git a/pym/portage/const.py b/pym/portage/const.py |
1173 |
-index acb90f9..5545a84 100644 |
1174 |
---- a/pym/portage/const.py |
1175 |
-+++ b/pym/portage/const.py |
1176 |
-@@ -125,6 +125,7 @@ SUPPORTED_FEATURES = frozenset([ |
1177 |
- "buildpkg", |
1178 |
- "buildsyspkg", |
1179 |
- "candy", |
1180 |
-+ "case-insensitive-fs", |
1181 |
- "ccache", |
1182 |
- "cgroup", |
1183 |
- "chflags", |
1184 |
-diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
1185 |
-index b46ba0b..8a68f4e 100644 |
1186 |
---- a/pym/portage/dbapi/vartree.py |
1187 |
-+++ b/pym/portage/dbapi/vartree.py |
1188 |
-@@ -1052,6 +1052,11 @@ class vardbapi(dbapi): |
1189 |
- def add(self, cpv): |
1190 |
- eroot_len = len(self._vardb._eroot) |
1191 |
- contents = self._vardb._dblink(cpv).getcontents() |
1192 |
-+ |
1193 |
-+ if "case-insensitive-fs" in self._vardb.settings.features: |
1194 |
-+ contents = dict((k.lower(), v) |
1195 |
-+ for k, v in contents.items()) |
1196 |
-+ |
1197 |
- pkg_hash = self._hash_pkg(cpv) |
1198 |
- if not contents: |
1199 |
- # Empty path is a code used to represent empty contents. |
1200 |
-@@ -1189,6 +1194,8 @@ class vardbapi(dbapi): |
1201 |
- hash_pkg = owners_cache._hash_pkg |
1202 |
- hash_str = owners_cache._hash_str |
1203 |
- base_names = self._vardb._aux_cache["owners"]["base_names"] |
1204 |
-+ case_insensitive = "case-insensitive-fs" \ |
1205 |
-+ in vardb.settings.features |
1206 |
- |
1207 |
- dblink_cache = {} |
1208 |
- |
1209 |
-@@ -1205,6 +1212,8 @@ class vardbapi(dbapi): |
1210 |
- while path_iter: |
1211 |
- |
1212 |
- path = path_iter.pop() |
1213 |
-+ if case_insensitive: |
1214 |
-+ path = path.lower() |
1215 |
- is_basename = os.sep != path[:1] |
1216 |
- if is_basename: |
1217 |
- name = path |
1218 |
-@@ -1236,6 +1245,8 @@ class vardbapi(dbapi): |
1219 |
- |
1220 |
- if is_basename: |
1221 |
- for p in dblink(cpv).getcontents(): |
1222 |
-+ if case_insensitive: |
1223 |
-+ p = p.lower() |
1224 |
- if os.path.basename(p) == name: |
1225 |
- owners.append((cpv, p[len(root):])) |
1226 |
- else: |
1227 |
-@@ -1265,8 +1276,12 @@ class vardbapi(dbapi): |
1228 |
- if not path_list: |
1229 |
- return |
1230 |
- |
1231 |
-+ case_insensitive = "case-insensitive-fs" \ |
1232 |
-+ in self._vardb.settings.features |
1233 |
- path_info_list = [] |
1234 |
- for path in path_list: |
1235 |
-+ if case_insensitive: |
1236 |
-+ path = path.lower() |
1237 |
- is_basename = os.sep != path[:1] |
1238 |
- if is_basename: |
1239 |
- name = path |
1240 |
-@@ -1285,6 +1300,8 @@ class vardbapi(dbapi): |
1241 |
- for path, name, is_basename in path_info_list: |
1242 |
- if is_basename: |
1243 |
- for p in dblnk.getcontents(): |
1244 |
-+ if case_insensitive: |
1245 |
-+ p = p.lower() |
1246 |
- if os.path.basename(p) == name: |
1247 |
- search_pkg.results.append((dblnk, p[len(root):])) |
1248 |
- else: |
1249 |
-@@ -1540,7 +1557,9 @@ class dblink(object): |
1250 |
- portage.util.shlex_split( |
1251 |
- self.settings.get("CONFIG_PROTECT", "")), |
1252 |
- portage.util.shlex_split( |
1253 |
-- self.settings.get("CONFIG_PROTECT_MASK", ""))) |
1254 |
-+ self.settings.get("CONFIG_PROTECT_MASK", "")), |
1255 |
-+ case_insensitive = ("case-insensitive-fs" |
1256 |
-+ in self.settings.features)) |
1257 |
- |
1258 |
- return self._protect_obj |
1259 |
- |
1260 |
-@@ -2762,7 +2781,16 @@ class dblink(object): |
1261 |
- filename.lstrip(os_filename_arg.path.sep))) |
1262 |
- |
1263 |
- pkgfiles = self.getcontents() |
1264 |
-+ |
1265 |
-+ preserve_case = None |
1266 |
-+ if "case-insensitive-fs" in self.settings.features: |
1267 |
-+ destfile = destfile.lower() |
1268 |
-+ preserve_case = dict((k.lower(), k) for k in pkgfiles) |
1269 |
-+ pkgfiles = dict((k.lower(), v) for k, v in pkgfiles.items()) |
1270 |
-+ |
1271 |
- if pkgfiles and destfile in pkgfiles: |
1272 |
-+ if preserve_case is not None: |
1273 |
-+ return preserve_case[destfile] |
1274 |
- return destfile |
1275 |
- if pkgfiles: |
1276 |
- basename = os_filename_arg.path.basename(destfile) |
1277 |
-@@ -2855,6 +2883,8 @@ class dblink(object): |
1278 |
- for p_path in p_path_list: |
1279 |
- x = os_filename_arg.path.join(p_path, basename) |
1280 |
- if x in pkgfiles: |
1281 |
-+ if preserve_case is not None: |
1282 |
-+ return preserve_case[x] |
1283 |
- return x |
1284 |
- |
1285 |
- return False |
1286 |
-diff --git a/pym/portage/update.py b/pym/portage/update.py |
1287 |
-index df4e11b..7a71092 100644 |
1288 |
---- a/pym/portage/update.py |
1289 |
-+++ b/pym/portage/update.py |
1290 |
-@@ -282,7 +282,8 @@ def parse_updates(mycontent): |
1291 |
- myupd.append(mysplit) |
1292 |
- return myupd, errors |
1293 |
- |
1294 |
--def update_config_files(config_root, protect, protect_mask, update_iter, match_callback = None): |
1295 |
-+def update_config_files(config_root, protect, protect_mask, update_iter, |
1296 |
-+ match_callback = None, case_insensitive = False): |
1297 |
- """Perform global updates on /etc/portage/package.*, /etc/portage/profile/package.*, |
1298 |
- /etc/portage/profile/packages and /etc/portage/sets. |
1299 |
- config_root - location of files to update |
1300 |
-@@ -406,7 +407,8 @@ def update_config_files(config_root, protect, protect_mask, update_iter, match_c |
1301 |
- sys.stdout.flush() |
1302 |
- |
1303 |
- protect_obj = ConfigProtect( |
1304 |
-- config_root, protect, protect_mask) |
1305 |
-+ config_root, protect, protect_mask, |
1306 |
-+ case_insensitive = case_insensitive) |
1307 |
- for x in update_files: |
1308 |
- updating_file = os.path.join(abs_user_config, x) |
1309 |
- if protect_obj.isprotected(updating_file): |
1310 |
-diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py |
1311 |
-index 4105c19..707b001 100644 |
1312 |
---- a/pym/portage/util/__init__.py |
1313 |
-+++ b/pym/portage/util/__init__.py |
1314 |
-@@ -1555,10 +1555,12 @@ class LazyItemsDict(UserDict): |
1315 |
- return result |
1316 |
- |
1317 |
- class ConfigProtect(object): |
1318 |
-- def __init__(self, myroot, protect_list, mask_list): |
1319 |
-+ def __init__(self, myroot, protect_list, mask_list, |
1320 |
-+ case_insensitive = False): |
1321 |
- self.myroot = myroot |
1322 |
- self.protect_list = protect_list |
1323 |
- self.mask_list = mask_list |
1324 |
-+ self.case_insensitive = case_insensitive |
1325 |
- self.updateprotect() |
1326 |
- |
1327 |
- def updateprotect(self): |
1328 |
-@@ -1572,6 +1574,8 @@ class ConfigProtect(object): |
1329 |
- for x in self.protect_list: |
1330 |
- ppath = normalize_path( |
1331 |
- os.path.join(self.myroot, x.lstrip(os.path.sep))) |
1332 |
-+ if self.case_insensitive: |
1333 |
-+ ppath = ppath.lower() |
1334 |
- try: |
1335 |
- if stat.S_ISDIR(os.stat(ppath).st_mode): |
1336 |
- self._dirs.add(ppath) |
1337 |
-@@ -1584,6 +1588,8 @@ class ConfigProtect(object): |
1338 |
- for x in self.mask_list: |
1339 |
- ppath = normalize_path( |
1340 |
- os.path.join(self.myroot, x.lstrip(os.path.sep))) |
1341 |
-+ if self.case_insensitive: |
1342 |
-+ ppath = ppath.lower() |
1343 |
- try: |
1344 |
- """Use lstat so that anything, even a broken symlink can be |
1345 |
- protected.""" |
1346 |
-@@ -1604,6 +1610,8 @@ class ConfigProtect(object): |
1347 |
- masked = 0 |
1348 |
- protected = 0 |
1349 |
- sep = os.path.sep |
1350 |
-+ if self.case_insensitive: |
1351 |
-+ obj = obj.lower() |
1352 |
- for ppath in self.protect: |
1353 |
- if len(ppath) > masked and obj.startswith(ppath): |
1354 |
- if ppath in self._dirs: |
1355 |
--- |
1356 |
-1.8.5.5 |
1357 |
- |
1358 |
|
1359 |
diff --git a/sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch b/sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch |
1360 |
deleted file mode 100644 |
1361 |
index d38d966836..0000000000 |
1362 |
--- a/sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch |
1363 |
+++ /dev/null |
1364 |
@@ -1,68 +0,0 @@ |
1365 |
-commit e1fbd70801e93a5b77febc6c9e95ad43d0ecabbb |
1366 |
-Author: Fabian Groffen <grobian@g.o> |
1367 |
-Date: Sun Dec 22 14:45:31 2013 +0100 |
1368 |
- |
1369 |
- install_qa_check_macho: allow relative install_names |
1370 |
- |
1371 |
- relative install_names (@..../) will be used in binaries a lot, and if |
1372 |
- they are provided as such, there is nothing wrong with it. Since they |
1373 |
- disallow us to do any checks, we just do the least check we can do, |
1374 |
- which is for the install_name self-reference. We want to find the |
1375 |
- library that points to in the install image, if not, it must be wrong. |
1376 |
- |
1377 |
-diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh |
1378 |
-index 129f7d3..83004df 100644 |
1379 |
---- a/bin/misc-functions.sh |
1380 |
-+++ b/bin/misc-functions.sh |
1381 |
-@@ -1049,6 +1049,15 @@ install_qa_check_macho() { |
1382 |
- rm -f "${T}/mach-o.check" |
1383 |
- fi |
1384 |
- |
1385 |
-+ install_name_is_relative() { |
1386 |
-+ case $1 in |
1387 |
-+ "@executable_path/"*) return 0 ;; |
1388 |
-+ "@loader_path"/*) return 0 ;; |
1389 |
-+ "@rpath/"*) return 0 ;; |
1390 |
-+ *) return 1 ;; |
1391 |
-+ esac |
1392 |
-+ } |
1393 |
-+ |
1394 |
- # While we generate the NEEDED files, check that we don't get kernel |
1395 |
- # traps at runtime because of broken install_names on Darwin. |
1396 |
- rm -f "${T}"/.install_name_check_failed |
1397 |
-@@ -1061,6 +1070,17 @@ install_qa_check_macho() { |
1398 |
- # See if the self-reference install_name points to an existing |
1399 |
- # and to be installed file. This usually is a symlink for the |
1400 |
- # major version. |
1401 |
-+ if install_name_is_relative ${install_name} ; then |
1402 |
-+ # try to locate the library in the installed image |
1403 |
-+ local inpath=${install_name#@*/} |
1404 |
-+ local libl |
1405 |
-+ for libl in $(find "${ED}" -name "${inpath##*/}") ; do |
1406 |
-+ if [[ ${libl} == */${inpath} ]] ; then |
1407 |
-+ install_name=/${libl#${D}} |
1408 |
-+ break |
1409 |
-+ fi |
1410 |
-+ done |
1411 |
-+ fi |
1412 |
- if [[ ! -e ${D}${install_name} ]] ; then |
1413 |
- eqawarn "QA Notice: invalid self-reference install_name ${install_name} in ${obj}" |
1414 |
- # remember we are in an implicit subshell, that's |
1415 |
-@@ -1077,7 +1097,7 @@ install_qa_check_macho() { |
1416 |
- elif [[ ${lib} == ${S}* ]] ; then |
1417 |
- eqawarn "QA Notice: install_name references \${S}: ${lib} in ${obj}" |
1418 |
- touch "${T}"/.install_name_check_failed |
1419 |
-- elif [[ ! -e ${lib} && ! -e ${D}${lib} && ${lib} != "@executable_path/"* && ${lib} != "@loader_path/"* ]] ; then |
1420 |
-+ elif ! install_name_is_relative ${lib} && [[ ! -e ${lib} && ! -e ${D}${lib} ]] ; then |
1421 |
- eqawarn "QA Notice: invalid reference to ${lib} in ${obj}" |
1422 |
- # remember we are in an implicit subshell, that's |
1423 |
- # why we touch a file here ... ideally we should be |
1424 |
-@@ -1086,7 +1106,7 @@ install_qa_check_macho() { |
1425 |
- fi |
1426 |
- done |
1427 |
- |
1428 |
-- # backwards compatability |
1429 |
-+ # backwards compatibility |
1430 |
- echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED |
1431 |
- # what we use |
1432 |
- echo "${arch};${obj};${install_name};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.MACHO.3 |
1433 |
|
1434 |
diff --git a/sys-apps/portage/files/portage-2.2.7-sandbox.patch b/sys-apps/portage/files/portage-2.2.7-sandbox.patch |
1435 |
deleted file mode 100644 |
1436 |
index 9797d3165b..0000000000 |
1437 |
--- a/sys-apps/portage/files/portage-2.2.7-sandbox.patch |
1438 |
+++ /dev/null |
1439 |
@@ -1,21 +0,0 @@ |
1440 |
-candidate patch to be included in the next revision |
1441 |
- |
1442 |
-https://bugs.gentoo.org/show_bug.cgi?id=490016 |
1443 |
- |
1444 |
-diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py |
1445 |
-index 691ef97..7a000b1 100644 |
1446 |
---- a/pym/portage/package/ebuild/doebuild.py |
1447 |
-+++ b/pym/portage/package/ebuild/doebuild.py |
1448 |
-@@ -1311,10 +1311,8 @@ def _spawn_actionmap(settings): |
1449 |
- nosandbox = ("sandbox" not in features and \ |
1450 |
- "usersandbox" not in features) |
1451 |
- |
1452 |
-- if not portage.process.sandbox_capable: |
1453 |
-- nosandbox = True |
1454 |
-- |
1455 |
-- if not portage.process.macossandbox_capable: |
1456 |
-+ if not (portage.process.sandbox_capable or \ |
1457 |
-+ portage.process.macossandbox_capable): |
1458 |
- nosandbox = True |
1459 |
- |
1460 |
- sesandbox = settings.selinux_enabled() and \ |
1461 |
|
1462 |
diff --git a/sys-apps/portage/files/portage-2.2.7-shebang-fixes.patch b/sys-apps/portage/files/portage-2.2.7-shebang-fixes.patch |
1463 |
deleted file mode 100644 |
1464 |
index afb00c15aa..0000000000 |
1465 |
--- a/sys-apps/portage/files/portage-2.2.7-shebang-fixes.patch |
1466 |
+++ /dev/null |
1467 |
@@ -1,153 +0,0 @@ |
1468 |
-Hi Fabian, |
1469 |
- |
1470 |
-when /bin/bash is some bash-3.x, things break miserably: |
1471 |
-/tools/gentoo/buildslave/sauxz3-f_pfx-10.0/build/gentoo-prefix/usr/lib/portage/bin/eapi.sh: line 8: syntax error in conditional expression: unexpected token `(' |
1472 |
-/tools/gentoo/buildslave/sauxz3-f_pfx-10.0/build/gentoo-prefix/usr/lib/portage/bin/eapi.sh: line 8: syntax error near `^(0' |
1473 |
-/tools/gentoo/buildslave/sauxz3-f_pfx-10.0/build/gentoo-prefix/usr/lib/portage/bin/eapi.sh: line 8: ` [[ ! ${1-${EAPI}} =~ ^(0|1|2|3)$ ]]' |
1474 |
-/tools/gentoo/buildslave/sauxz3-f_pfx-10.0/build/gentoo-prefix/usr/lib/portage/bin/ebuild-helpers/keepdir: line 7: ___eapi_has_prefix_variables: command not found |
1475 |
- |
1476 |
-There are still some scripts in 2.2.7 that need to get the shebangs fixed: |
1477 |
-$ git grep '#!/' |
1478 |
- |
1479 |
-Thanks! |
1480 |
-/haubi/ |
1481 |
---- |
1482 |
- bin/bashrc-functions.sh | 2 +- |
1483 |
- bin/eapi.sh | 2 +- |
1484 |
- bin/ebuild-helpers/doheader | 2 +- |
1485 |
- bin/ebuild-helpers/keepdir | 2 +- |
1486 |
- bin/ebuild-helpers/newins | 1 - |
1487 |
- bin/ebuild-helpers/xattr/install | 2 +- |
1488 |
- bin/helper-functions.sh | 2 +- |
1489 |
- bin/install.py | 2 +- |
1490 |
- bin/phase-functions.sh | 2 +- |
1491 |
- bin/phase-helpers.sh | 2 +- |
1492 |
- bin/xattr-helper.py | 2 +- |
1493 |
- misc/emerge-delta-webrsync | 2 +- |
1494 |
- 12 files changed, 11 insertions(+), 12 deletions(-) |
1495 |
- |
1496 |
-diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh |
1497 |
-index 69a5eb9..1a92738 100644 |
1498 |
---- a/bin/bashrc-functions.sh |
1499 |
-+++ b/bin/bashrc-functions.sh |
1500 |
-@@ -1,4 +1,4 @@ |
1501 |
--#!@PREFIX_PORTAGE_BASH@ |
1502 |
-+#!@PORTAGE_BASH@ |
1503 |
- # Copyright 1999-2013 Gentoo Foundation |
1504 |
- # Distributed under the terms of the GNU General Public License v2 |
1505 |
- |
1506 |
-diff --git a/bin/eapi.sh b/bin/eapi.sh |
1507 |
-index 623b89f..670f884 100644 |
1508 |
---- a/bin/eapi.sh |
1509 |
-+++ b/bin/eapi.sh |
1510 |
-@@ -1,4 +1,4 @@ |
1511 |
--#!/bin/bash |
1512 |
-+#!@PORTAGE_BASH@ |
1513 |
- # Copyright 2012 Gentoo Foundation |
1514 |
- # Distributed under the terms of the GNU General Public License v2 |
1515 |
- |
1516 |
-diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader |
1517 |
-index 3795365..5b6b169 100755 |
1518 |
---- a/bin/ebuild-helpers/doheader |
1519 |
-+++ b/bin/ebuild-helpers/doheader |
1520 |
-@@ -1,4 +1,4 @@ |
1521 |
--#!/bin/bash |
1522 |
-+#!@PORTAGE_BASH@ |
1523 |
- # Copyright 1999-2012 Gentoo Foundation |
1524 |
- # Distributed under the terms of the GNU General Public License v2 |
1525 |
- |
1526 |
-diff --git a/bin/ebuild-helpers/keepdir b/bin/ebuild-helpers/keepdir |
1527 |
-index bec2feb..7167981 100755 |
1528 |
---- a/bin/ebuild-helpers/keepdir |
1529 |
-+++ b/bin/ebuild-helpers/keepdir |
1530 |
-@@ -1,4 +1,4 @@ |
1531 |
--#!/bin/bash |
1532 |
-+#!@PORTAGE_BASH@ |
1533 |
- # Copyright 1999-2013 Gentoo Foundation |
1534 |
- # Distributed under the terms of the GNU General Public License v2 |
1535 |
- |
1536 |
-diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins |
1537 |
-index 26dd049..2638a38 100755 |
1538 |
---- a/bin/ebuild-helpers/newins |
1539 |
-+++ b/bin/ebuild-helpers/newins |
1540 |
-@@ -1,5 +1,4 @@ |
1541 |
- #!@PORTAGE_BASH@ |
1542 |
--#!/bin/bash |
1543 |
- # Copyright 1999-2012 Gentoo Foundation |
1544 |
- # Distributed under the terms of the GNU General Public License v2 |
1545 |
- |
1546 |
-diff --git a/bin/ebuild-helpers/xattr/install b/bin/ebuild-helpers/xattr/install |
1547 |
-index f51f621..b1d2315 100755 |
1548 |
---- a/bin/ebuild-helpers/xattr/install |
1549 |
-+++ b/bin/ebuild-helpers/xattr/install |
1550 |
-@@ -1,4 +1,4 @@ |
1551 |
--#!/bin/bash |
1552 |
-+#!@PORTAGE_BASH@ |
1553 |
- # Copyright 2013 Gentoo Foundation |
1554 |
- # Distributed under the terms of the GNU General Public License v2 |
1555 |
- |
1556 |
-diff --git a/bin/helper-functions.sh b/bin/helper-functions.sh |
1557 |
-index c574612..864d5fe 100644 |
1558 |
---- a/bin/helper-functions.sh |
1559 |
-+++ b/bin/helper-functions.sh |
1560 |
-@@ -1,4 +1,4 @@ |
1561 |
--#!/bin/bash |
1562 |
-+#!@PORTAGE_BASH@ |
1563 |
- # Copyright 1999-2012 Gentoo Foundation |
1564 |
- # Distributed under the terms of the GNU General Public License v2 |
1565 |
- |
1566 |
-diff --git a/bin/install.py b/bin/install.py |
1567 |
-index 2c6dfbe..9bd38c7 100755 |
1568 |
---- a/bin/install.py |
1569 |
-+++ b/bin/install.py |
1570 |
-@@ -1,4 +1,4 @@ |
1571 |
--#!/usr/bin/python |
1572 |
-+#!@PREFIX_PORTAGE_PYTHON@ |
1573 |
- # Copyright 2013 Gentoo Foundation |
1574 |
- # Distributed under the terms of the GNU General Public License v2 |
1575 |
- |
1576 |
-diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh |
1577 |
-index 80e7cc6..4650e14 100644 |
1578 |
---- a/bin/phase-functions.sh |
1579 |
-+++ b/bin/phase-functions.sh |
1580 |
-@@ -1,4 +1,4 @@ |
1581 |
--#!@PREFIX_PORTAGE_BASH@ |
1582 |
-+#!@PORTAGE_BASH@ |
1583 |
- # Copyright 1999-2013 Gentoo Foundation |
1584 |
- # Distributed under the terms of the GNU General Public License v2 |
1585 |
- |
1586 |
-diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh |
1587 |
-index 12238c6..dc20991 100644 |
1588 |
---- a/bin/phase-helpers.sh |
1589 |
-+++ b/bin/phase-helpers.sh |
1590 |
-@@ -1,4 +1,4 @@ |
1591 |
--#!@PREFIX_PORTAGE_BASH@ |
1592 |
-+#!@PORTAGE_BASH@ |
1593 |
- # Copyright 1999-2013 Gentoo Foundation |
1594 |
- # Distributed under the terms of the GNU General Public License v2 |
1595 |
- |
1596 |
-diff --git a/bin/xattr-helper.py b/bin/xattr-helper.py |
1597 |
-index a85309f..d6cef4f 100755 |
1598 |
---- a/bin/xattr-helper.py |
1599 |
-+++ b/bin/xattr-helper.py |
1600 |
-@@ -1,4 +1,4 @@ |
1601 |
--#!/usr/bin/python |
1602 |
-+#!@PREFIX_PORTAGE_PYTHON@ |
1603 |
- # Copyright 2012-2013 Gentoo Foundation |
1604 |
- # Distributed under the terms of the GNU General Public License v2 |
1605 |
- |
1606 |
-diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync |
1607 |
-index b16982b..66e9275 100755 |
1608 |
---- a/misc/emerge-delta-webrsync |
1609 |
-+++ b/misc/emerge-delta-webrsync |
1610 |
-@@ -1,4 +1,4 @@ |
1611 |
--#!/bin/bash |
1612 |
-+#!@PORTAGE_BASH@ |
1613 |
- # Copyright 1999-2013 Gentoo Foundation |
1614 |
- # Distributed under the terms of the GNU General Public License v2 |
1615 |
- # Author: Brian Harring <ferringb@g.o>, karltk@g.o originally. |
1616 |
--- |
1617 |
-1.8.1.5 |
1618 |
- |
1619 |
- |
1620 |
- |
1621 |
|
1622 |
diff --git a/sys-apps/portage/files/portage-2.3.5-prefix-chaining.patch b/sys-apps/portage/files/portage-2.3.18-prefix-chaining.patch |
1623 |
similarity index 87% |
1624 |
rename from sys-apps/portage/files/portage-2.3.5-prefix-chaining.patch |
1625 |
rename to sys-apps/portage/files/portage-2.3.18-prefix-chaining.patch |
1626 |
index fa6ee5f690..1c2537eb00 100644 |
1627 |
--- a/sys-apps/portage/files/portage-2.3.5-prefix-chaining.patch |
1628 |
+++ b/sys-apps/portage/files/portage-2.3.18-prefix-chaining.patch |
1629 |
@@ -1,8 +1,10 @@ |
1630 |
-From d5990d439a42a5195bf8b2f8df16da532674c3f2 Mon Sep 17 00:00:00 2001 |
1631 |
+From: hanetzer@×××××××××.com |
1632 |
From: Michael Haubenwallner <haubi@g.o> |
1633 |
Date: Thu, 23 Mar 2017 13:52:32 +0100 |
1634 |
Subject: [PATCH] add prefix-chaining support |
1635 |
|
1636 |
+updated for 2.3.18 |
1637 |
+ |
1638 |
--- |
1639 |
bin/install-qa-check.d/05prefix | 30 ++++++- |
1640 |
bin/phase-helpers.sh | 28 ++++++ |
1641 |
@@ -15,14 +17,12 @@ Subject: [PATCH] add prefix-chaining support |
1642 |
pym/portage/dep/dep_check.py | 99 +++++++++++++++++++++- |
1643 |
.../package/ebuild/_config/LocationsManager.py | 3 + |
1644 |
pym/portage/package/ebuild/config.py | 62 ++++++++++++++ |
1645 |
- pym/portage/package/ebuild/doebuild.py | 25 +++++- |
1646 |
+ pym/portage/package/ebuild/doebuild.py | 24 +++++- |
1647 |
pym/portage/package/ebuild/fetch.py | 4 + |
1648 |
pym/portage/sync/controller.py | 27 +++--- |
1649 |
pym/portage/util/_dyn_libs/LinkageMapELF.py | 4 +- |
1650 |
- 15 files changed, 376 insertions(+), 48 deletions(-) |
1651 |
+ 15 files changed, 376 insertions(+), 47 deletions(-) |
1652 |
|
1653 |
-diff --git a/bin/install-qa-check.d/05prefix b/bin/install-qa-check.d/05prefix |
1654 |
-index 32561e2..0c11473 100644 |
1655 |
--- a/bin/install-qa-check.d/05prefix |
1656 |
+++ b/bin/install-qa-check.d/05prefix |
1657 |
@@ -79,16 +79,42 @@ install_qa_check_prefix() { |
1658 |
@@ -70,11 +70,9 @@ index 32561e2..0c11473 100644 |
1659 |
continue |
1660 |
else |
1661 |
# this is definitely wrong: script in $PATH and invalid shebang |
1662 |
-diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh |
1663 |
-index 349cd20..5d2a735 100644 |
1664 |
--- a/bin/phase-helpers.sh |
1665 |
+++ b/bin/phase-helpers.sh |
1666 |
-@@ -867,6 +867,10 @@ has_version() { |
1667 |
+@@ -868,6 +868,10 @@ has_version() { |
1668 |
"${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" has_version "${eroot}" "${atom}" |
1669 |
fi |
1670 |
local retval=$? |
1671 |
@@ -85,7 +83,7 @@ index 349cd20..5d2a735 100644 |
1672 |
case "${retval}" in |
1673 |
0|1) |
1674 |
return ${retval} |
1675 |
-@@ -926,6 +930,10 @@ best_version() { |
1676 |
+@@ -927,6 +931,10 @@ best_version() { |
1677 |
"${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" best_version "${eroot}" "${atom}" |
1678 |
fi |
1679 |
local retval=$? |
1680 |
@@ -96,7 +94,7 @@ index 349cd20..5d2a735 100644 |
1681 |
case "${retval}" in |
1682 |
0|1) |
1683 |
return ${retval} |
1684 |
-@@ -1145,6 +1153,10 @@ if ___eapi_has_master_repositories; then |
1685 |
+@@ -1167,6 +1175,10 @@ if ___eapi_has_master_repositories; then |
1686 |
output=$("${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" master_repositories "${EROOT}" "${repository}") |
1687 |
fi |
1688 |
retval=$? |
1689 |
@@ -107,7 +105,7 @@ index 349cd20..5d2a735 100644 |
1690 |
[[ -n ${output} ]] && echo "${output}" |
1691 |
case "${retval}" in |
1692 |
0|1) |
1693 |
-@@ -1176,6 +1188,10 @@ if ___eapi_has_repository_path; then |
1694 |
+@@ -1198,6 +1210,10 @@ if ___eapi_has_repository_path; then |
1695 |
output=$("${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" get_repo_path "${EROOT}" "${repository}") |
1696 |
fi |
1697 |
retval=$? |
1698 |
@@ -118,7 +116,7 @@ index 349cd20..5d2a735 100644 |
1699 |
[[ -n ${output} ]] && echo "${output}" |
1700 |
case "${retval}" in |
1701 |
0|1) |
1702 |
-@@ -1206,6 +1222,10 @@ if ___eapi_has_available_eclasses; then |
1703 |
+@@ -1228,6 +1244,10 @@ if ___eapi_has_available_eclasses; then |
1704 |
output=$("${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" available_eclasses "${EROOT}" "${repository}") |
1705 |
fi |
1706 |
retval=$? |
1707 |
@@ -129,7 +127,7 @@ index 349cd20..5d2a735 100644 |
1708 |
[[ -n ${output} ]] && echo "${output}" |
1709 |
case "${retval}" in |
1710 |
0|1) |
1711 |
-@@ -1236,6 +1256,10 @@ if ___eapi_has_eclass_path; then |
1712 |
+@@ -1258,6 +1278,10 @@ if ___eapi_has_eclass_path; then |
1713 |
else |
1714 |
output=$("${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" eclass_path "${EROOT}" "${repository}" "${eclass}") |
1715 |
fi |
1716 |
@@ -140,7 +138,7 @@ index 349cd20..5d2a735 100644 |
1717 |
retval=$? |
1718 |
[[ -n ${output} ]] && echo "${output}" |
1719 |
case "${retval}" in |
1720 |
-@@ -1267,6 +1291,10 @@ if ___eapi_has_license_path; then |
1721 |
+@@ -1289,6 +1313,10 @@ if ___eapi_has_license_path; then |
1722 |
else |
1723 |
output=$("${PORTAGE_BIN_PATH}/ebuild-helpers/portageq" license_path "${EROOT}" "${repository}" "${license}") |
1724 |
fi |
1725 |
@@ -151,8 +149,6 @@ index 349cd20..5d2a735 100644 |
1726 |
retval=$? |
1727 |
[[ -n ${output} ]] && echo "${output}" |
1728 |
case "${retval}" in |
1729 |
-diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py |
1730 |
-index 704243a..c1b9c06 100644 |
1731 |
--- a/pym/_emerge/actions.py |
1732 |
+++ b/pym/_emerge/actions.py |
1733 |
@@ -39,7 +39,7 @@ from portage import os |
1734 |
@@ -164,7 +160,7 @@ index 704243a..c1b9c06 100644 |
1735 |
from portage.const import GLOBAL_CONFIG_PATH, VCS_DIRS, _DEPCLEAN_LIB_CHECK_DEFAULT |
1736 |
from portage.const import SUPPORTED_BINPKG_FORMATS, TIMESTAMP_FORMAT |
1737 |
from portage.dbapi.dep_expand import dep_expand |
1738 |
-@@ -65,6 +65,7 @@ from portage.util.SlotObject import SlotObject |
1739 |
+@@ -65,6 +65,7 @@ from portage.util.SlotObject import Slot |
1740 |
from portage.util._async.run_main_scheduler import run_main_scheduler |
1741 |
from portage.util._async.SchedulerInterface import SchedulerInterface |
1742 |
from portage.util._eventloop.global_event_loop import global_event_loop |
1743 |
@@ -172,7 +168,7 @@ index 704243a..c1b9c06 100644 |
1744 |
from portage._global_updates import _global_updates |
1745 |
from portage.sync.old_tree_timestamp import old_tree_timestamp_warn |
1746 |
from portage.localization import _ |
1747 |
-@@ -2633,6 +2634,9 @@ def missing_sets_warning(root_config, missing_sets): |
1748 |
+@@ -2659,6 +2660,9 @@ def missing_sets_warning(root_config, mi |
1749 |
if portage.const.EPREFIX: |
1750 |
global_config_path = os.path.join(portage.const.EPREFIX, |
1751 |
portage.const.GLOBAL_CONFIG_PATH.lstrip(os.sep)) |
1752 |
@@ -182,14 +178,18 @@ index 704243a..c1b9c06 100644 |
1753 |
msg.append(" This usually means that '%s'" % \ |
1754 |
(os.path.join(global_config_path, "sets/portage.conf"),)) |
1755 |
msg.append(" is missing or corrupt.") |
1756 |
-diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
1757 |
-index 53881c5..8198fe1 100644 |
1758 |
--- a/pym/_emerge/depgraph.py |
1759 |
+++ b/pym/_emerge/depgraph.py |
1760 |
-@@ -3097,23 +3097,24 @@ class depgraph(object): |
1761 |
- edepend["HDEPEND"] = "" |
1762 |
- |
1763 |
+@@ -3239,15 +3239,15 @@ class depgraph(object): |
1764 |
+ # _dep_disjunctive_stack first, so that choices for build-time |
1765 |
+ # deps influence choices for run-time deps (bug 639346). |
1766 |
deps = ( |
1767 |
+- (myroot, edepend["RDEPEND"], |
1768 |
++ (myroot, "RDEPEND", |
1769 |
+ self._priority(runtime=True)), |
1770 |
+- (myroot, edepend["PDEPEND"], |
1771 |
++ (myroot, "PDEPEND", |
1772 |
+ self._priority(runtime_post=True)), |
1773 |
- (depend_root, edepend["DEPEND"], |
1774 |
+ (depend_root, "DEPEND", |
1775 |
self._priority(buildtime=True, |
1776 |
@@ -200,23 +200,18 @@ index 53881c5..8198fe1 100644 |
1777 |
self._priority(buildtime=True, |
1778 |
optional=(pkg.built or ignore_hdepend_deps), |
1779 |
ignored=ignore_hdepend_deps)), |
1780 |
-- (myroot, edepend["RDEPEND"], |
1781 |
-+ (myroot, "RDEPEND", |
1782 |
- self._priority(runtime=True)), |
1783 |
-- (myroot, edepend["PDEPEND"], |
1784 |
-+ (myroot, "PDEPEND", |
1785 |
- self._priority(runtime_post=True)) |
1786 |
- ) |
1787 |
+@@ -3255,8 +3255,8 @@ class depgraph(object): |
1788 |
|
1789 |
debug = "--debug" in self._frozen_config.myopts |
1790 |
|
1791 |
- for dep_root, dep_string, dep_priority in deps: |
1792 |
+- if not dep_string: |
1793 |
+ for dep_root, dep_type, dep_priority in deps: |
1794 |
-+ dep_string = edepend[dep_type] |
1795 |
- if not dep_string: |
1796 |
++ if not dep_string: |
1797 |
continue |
1798 |
if debug: |
1799 |
-@@ -3151,7 +3152,7 @@ class depgraph(object): |
1800 |
+ writemsg_level("\nParent: %s\n" % (pkg,), |
1801 |
+@@ -3293,7 +3293,7 @@ class depgraph(object): |
1802 |
|
1803 |
try: |
1804 |
dep_string = list(self._queue_disjunctive_deps( |
1805 |
@@ -225,7 +220,7 @@ index 53881c5..8198fe1 100644 |
1806 |
except portage.exception.InvalidDependString as e: |
1807 |
if pkg.installed: |
1808 |
self._dynamic_config._masked_installed.add(pkg) |
1809 |
-@@ -3166,14 +3167,14 @@ class depgraph(object): |
1810 |
+@@ -3308,14 +3308,14 @@ class depgraph(object): |
1811 |
|
1812 |
if not self._add_pkg_dep_string( |
1813 |
pkg, dep_root, dep_priority, dep_string, |
1814 |
@@ -242,7 +237,7 @@ index 53881c5..8198fe1 100644 |
1815 |
_autounmask_backup = self._dynamic_config._autounmask |
1816 |
if dep_priority.optional or dep_priority.ignored: |
1817 |
# Temporarily disable autounmask for deps that |
1818 |
-@@ -3182,7 +3183,7 @@ class depgraph(object): |
1819 |
+@@ -3324,7 +3324,7 @@ class depgraph(object): |
1820 |
try: |
1821 |
return self._wrapped_add_pkg_dep_string( |
1822 |
pkg, dep_root, dep_priority, dep_string, |
1823 |
@@ -251,7 +246,7 @@ index 53881c5..8198fe1 100644 |
1824 |
finally: |
1825 |
self._dynamic_config._autounmask = _autounmask_backup |
1826 |
|
1827 |
-@@ -3218,7 +3219,7 @@ class depgraph(object): |
1828 |
+@@ -3360,7 +3360,7 @@ class depgraph(object): |
1829 |
not slot_operator_rebuild |
1830 |
|
1831 |
def _wrapped_add_pkg_dep_string(self, pkg, dep_root, dep_priority, |
1832 |
@@ -260,7 +255,7 @@ index 53881c5..8198fe1 100644 |
1833 |
if isinstance(pkg.depth, int): |
1834 |
depth = pkg.depth + 1 |
1835 |
else: |
1836 |
-@@ -3242,7 +3243,7 @@ class depgraph(object): |
1837 |
+@@ -3384,7 +3384,7 @@ class depgraph(object): |
1838 |
try: |
1839 |
selected_atoms = self._select_atoms(dep_root, |
1840 |
dep_string, myuse=self._pkg_use_enabled(pkg), parent=pkg, |
1841 |
@@ -269,7 +264,7 @@ index 53881c5..8198fe1 100644 |
1842 |
except portage.exception.InvalidDependString: |
1843 |
if pkg.installed: |
1844 |
self._dynamic_config._masked_installed.add(pkg) |
1845 |
-@@ -3540,7 +3541,7 @@ class depgraph(object): |
1846 |
+@@ -3691,7 +3691,7 @@ class depgraph(object): |
1847 |
child_pkgs.sort() |
1848 |
yield (atom, child_pkgs[-1]) |
1849 |
|
1850 |
@@ -278,7 +273,7 @@ index 53881c5..8198fe1 100644 |
1851 |
""" |
1852 |
Queue disjunctive (virtual and ||) deps in self._dynamic_config._dep_disjunctive_stack. |
1853 |
Yields non-disjunctive deps. Raises InvalidDependString when |
1854 |
-@@ -3549,33 +3550,33 @@ class depgraph(object): |
1855 |
+@@ -3700,33 +3700,33 @@ class depgraph(object): |
1856 |
for x in dep_struct: |
1857 |
if isinstance(x, list): |
1858 |
if x and x[0] == "||": |
1859 |
@@ -319,7 +314,7 @@ index 53881c5..8198fe1 100644 |
1860 |
return 0 |
1861 |
return 1 |
1862 |
|
1863 |
-@@ -4428,7 +4429,7 @@ class depgraph(object): |
1864 |
+@@ -4579,7 +4579,7 @@ class depgraph(object): |
1865 |
return self._select_atoms_highest_available(*pargs, **kwargs) |
1866 |
|
1867 |
def _select_atoms_highest_available(self, root, depstring, |
1868 |
@@ -328,7 +323,7 @@ index 53881c5..8198fe1 100644 |
1869 |
"""This will raise InvalidDependString if necessary. If trees is |
1870 |
None then self._dynamic_config._filtered_trees is used.""" |
1871 |
|
1872 |
-@@ -4451,6 +4452,13 @@ class depgraph(object): |
1873 |
+@@ -4602,6 +4602,13 @@ class depgraph(object): |
1874 |
pkgsettings = self._frozen_config.pkgsettings[root] |
1875 |
if trees is None: |
1876 |
trees = self._dynamic_config._filtered_trees |
1877 |
@@ -342,7 +337,7 @@ index 53881c5..8198fe1 100644 |
1878 |
mytrees = trees[root] |
1879 |
atom_graph = digraph() |
1880 |
if True: |
1881 |
-@@ -4482,7 +4490,7 @@ class depgraph(object): |
1882 |
+@@ -4633,7 +4640,7 @@ class depgraph(object): |
1883 |
|
1884 |
mycheck = portage.dep_check(depstring, None, |
1885 |
pkgsettings, myuse=myuse, |
1886 |
@@ -351,7 +346,7 @@ index 53881c5..8198fe1 100644 |
1887 |
finally: |
1888 |
# restore state |
1889 |
self._dynamic_config._autounmask = _autounmask_backup |
1890 |
-@@ -4558,6 +4566,7 @@ class depgraph(object): |
1891 |
+@@ -4709,6 +4716,7 @@ class depgraph(object): |
1892 |
continue |
1893 |
node_stack.append((child_node, node, child_atom)) |
1894 |
|
1895 |
@@ -359,11 +354,9 @@ index 53881c5..8198fe1 100644 |
1896 |
return selected_atoms |
1897 |
|
1898 |
def _expand_virt_from_graph(self, root, atom): |
1899 |
-diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py |
1900 |
-index e993ce1..32a942c 100644 |
1901 |
--- a/pym/_emerge/resolver/output.py |
1902 |
+++ b/pym/_emerge/resolver/output.py |
1903 |
-@@ -22,11 +22,12 @@ from portage.localization import localized_size |
1904 |
+@@ -22,11 +22,12 @@ from portage.localization import localiz |
1905 |
from portage.package.ebuild.config import _get_feature_flags |
1906 |
from portage.package.ebuild._spawn_nofetch import spawn_nofetch |
1907 |
from portage.output import ( blue, colorize, create_color_func, |
1908 |
@@ -428,11 +421,9 @@ index e993ce1..32a942c 100644 |
1909 |
self.print_messages(show_repos) |
1910 |
self.print_blockers() |
1911 |
if self.conf.verbosity == 3: |
1912 |
-diff --git a/pym/portage/_sets/__init__.py b/pym/portage/_sets/__init__.py |
1913 |
-index 2c9bf97..6a27842 100644 |
1914 |
--- a/pym/portage/_sets/__init__.py |
1915 |
+++ b/pym/portage/_sets/__init__.py |
1916 |
-@@ -21,6 +21,7 @@ from portage.const import _ENABLE_SET_CONFIG |
1917 |
+@@ -21,6 +21,7 @@ from portage.const import _ENABLE_SET_CO |
1918 |
from portage.exception import PackageSetNotFound |
1919 |
from portage.localization import _ |
1920 |
from portage.util import writemsg_level |
1921 |
@@ -440,7 +431,7 @@ index 2c9bf97..6a27842 100644 |
1922 |
from portage.util.configparser import (SafeConfigParser, |
1923 |
NoOptionError, ParsingError, read_configs) |
1924 |
|
1925 |
-@@ -281,6 +282,10 @@ def load_default_config(settings, trees): |
1926 |
+@@ -281,6 +282,10 @@ def load_default_config(settings, trees) |
1927 |
if portage.const.EPREFIX: |
1928 |
global_config_path = os.path.join(portage.const.EPREFIX, |
1929 |
GLOBAL_CONFIG_PATH.lstrip(os.sep)) |
1930 |
@@ -451,11 +442,9 @@ index 2c9bf97..6a27842 100644 |
1931 |
vcs_dirs = [_unicode_encode(x, encoding=_encodings['fs']) for x in VCS_DIRS] |
1932 |
def _getfiles(): |
1933 |
for path, dirs, files in os.walk(os.path.join(global_config_path, "sets")): |
1934 |
-diff --git a/pym/portage/const.py b/pym/portage/const.py |
1935 |
-index 952b33c..351b499 100644 |
1936 |
--- a/pym/portage/const.py |
1937 |
+++ b/pym/portage/const.py |
1938 |
-@@ -191,6 +191,7 @@ SUPPORTED_FEATURES = frozenset([ |
1939 |
+@@ -189,6 +189,7 @@ SUPPORTED_FEATURES = frozenset([ |
1940 |
"notitles", |
1941 |
"parallel-fetch", |
1942 |
"parallel-install", |
1943 |
@@ -463,7 +452,7 @@ index 952b33c..351b499 100644 |
1944 |
"prelink-checksums", |
1945 |
"preserve-libs", |
1946 |
"protect-owned", |
1947 |
-@@ -269,6 +270,11 @@ MANIFEST2_IDENTIFIERS = ("AUX", "MISC", "DIST", "EBUILD") |
1948 |
+@@ -239,6 +240,11 @@ MANIFEST2_IDENTIFIERS = ("AUX", "MISC |
1949 |
#EPREFIX = "" |
1950 |
# END PREFIX LOCAL |
1951 |
|
1952 |
@@ -475,11 +464,9 @@ index 952b33c..351b499 100644 |
1953 |
# pick up EPREFIX from the environment if set |
1954 |
if "PORTAGE_OVERRIDE_EPREFIX" in os.environ: |
1955 |
EPREFIX = os.environ["PORTAGE_OVERRIDE_EPREFIX"] |
1956 |
-diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
1957 |
-index 83fe5d3..e4b2491 100644 |
1958 |
--- a/pym/portage/dbapi/vartree.py |
1959 |
+++ b/pym/portage/dbapi/vartree.py |
1960 |
-@@ -194,8 +194,19 @@ class vardbapi(dbapi): |
1961 |
+@@ -195,8 +195,19 @@ class vardbapi(dbapi): |
1962 |
self._counter_path = os.path.join(self._eroot, |
1963 |
CACHE_PATH, "counter") |
1964 |
|
1965 |
@@ -501,7 +488,7 @@ index 83fe5d3..e4b2491 100644 |
1966 |
self._linkmap = LinkageMap(self) |
1967 |
chost = self.settings.get('CHOST') |
1968 |
if not chost: |
1969 |
-@@ -236,6 +247,9 @@ class vardbapi(dbapi): |
1970 |
+@@ -237,6 +248,9 @@ class vardbapi(dbapi): |
1971 |
# This is an optimized hotspot, so don't use unicode-wrapped |
1972 |
# os module and don't use os.path.join(). |
1973 |
rValue = self._eroot + VDB_PATH + _os.sep + mykey |
1974 |
@@ -511,7 +498,7 @@ index 83fe5d3..e4b2491 100644 |
1975 |
if filename is not None: |
1976 |
# If filename is always relative, we can do just |
1977 |
# rValue += _os.sep + filename |
1978 |
-@@ -499,6 +513,9 @@ class vardbapi(dbapi): |
1979 |
+@@ -500,6 +514,9 @@ class vardbapi(dbapi): |
1980 |
returnme = [] |
1981 |
basepath = os.path.join(self._eroot, VDB_PATH) + os.path.sep |
1982 |
|
1983 |
@@ -521,7 +508,7 @@ index 83fe5d3..e4b2491 100644 |
1984 |
if use_cache: |
1985 |
from portage import listdir |
1986 |
else: |
1987 |
-@@ -595,11 +612,17 @@ class vardbapi(dbapi): |
1988 |
+@@ -596,11 +613,17 @@ class vardbapi(dbapi): |
1989 |
del self.matchcache[mycat] |
1990 |
return list(self._iter_match(mydep, |
1991 |
self.cp_list(mydep.cp, use_cache=use_cache))) |
1992 |
@@ -541,7 +528,7 @@ index 83fe5d3..e4b2491 100644 |
1993 |
except (IOError, OSError): |
1994 |
curmtime=0 |
1995 |
|
1996 |
-@@ -1421,7 +1444,7 @@ class vardbapi(dbapi): |
1997 |
+@@ -1448,7 +1471,7 @@ class vardbapi(dbapi): |
1998 |
class vartree(object): |
1999 |
"this tree will scan a var/db/pkg database located at root (passed to init)" |
2000 |
def __init__(self, root=None, virtual=DeprecationWarning, categories=None, |
2001 |
@@ -550,7 +537,7 @@ index 83fe5d3..e4b2491 100644 |
2002 |
|
2003 |
if settings is None: |
2004 |
settings = portage.settings |
2005 |
-@@ -1439,6 +1462,7 @@ class vartree(object): |
2006 |
+@@ -1466,6 +1489,7 @@ class vartree(object): |
2007 |
" constructor is unused", |
2008 |
DeprecationWarning, stacklevel=2) |
2009 |
|
2010 |
@@ -558,11 +545,9 @@ index 83fe5d3..e4b2491 100644 |
2011 |
self.settings = settings |
2012 |
self.dbapi = vardbapi(settings=settings, vartree=self) |
2013 |
self.populated = 1 |
2014 |
-diff --git a/pym/portage/dep/dep_check.py b/pym/portage/dep/dep_check.py |
2015 |
-index 737d2b1..7ca883a 100644 |
2016 |
--- a/pym/portage/dep/dep_check.py |
2017 |
+++ b/pym/portage/dep/dep_check.py |
2018 |
-@@ -255,6 +255,95 @@ class _dep_choice(SlotObject): |
2019 |
+@@ -298,6 +298,95 @@ class _dep_choice(SlotObject): |
2020 |
__slots__ = ('atoms', 'slot_map', 'cp_map', 'all_available', |
2021 |
'all_installed_slots') |
2022 |
|
2023 |
@@ -658,7 +643,7 @@ index 737d2b1..7ca883a 100644 |
2024 |
def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): |
2025 |
""" |
2026 |
Takes an unreduced and reduced deplist and removes satisfied dependencies. |
2027 |
-@@ -643,7 +732,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): |
2028 |
+@@ -695,7 +784,7 @@ def dep_zapdeps(unreduced, reduced, myro |
2029 |
assert(False) # This point should not be reachable |
2030 |
|
2031 |
def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, |
2032 |
@@ -667,7 +652,7 @@ index 737d2b1..7ca883a 100644 |
2033 |
""" |
2034 |
Takes a depend string, parses it, and selects atoms. |
2035 |
The myroot parameter is unused (use mysettings['EROOT'] instead). |
2036 |
-@@ -741,6 +830,14 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, |
2037 |
+@@ -796,6 +885,14 @@ def dep_check(depstring, mydbapi, mysett |
2038 |
writemsg("mysplit: %s\n" % (mysplit), 1) |
2039 |
writemsg("mysplit2: %s\n" % (mysplit2), 1) |
2040 |
|
2041 |
@@ -682,8 +667,6 @@ index 737d2b1..7ca883a 100644 |
2042 |
selected_atoms = dep_zapdeps(mysplit, mysplit2, myroot, |
2043 |
use_binaries=use_binaries, trees=trees) |
2044 |
|
2045 |
-diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py |
2046 |
-index 55b8c08..32e969e 100644 |
2047 |
--- a/pym/portage/package/ebuild/_config/LocationsManager.py |
2048 |
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py |
2049 |
@@ -307,6 +307,9 @@ class LocationsManager(object): |
2050 |
@@ -696,11 +679,9 @@ index 55b8c08..32e969e 100644 |
2051 |
|
2052 |
def set_port_dirs(self, portdir, portdir_overlay): |
2053 |
self.portdir = portdir |
2054 |
-diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
2055 |
-index 1ac2cb1..2e31cf0 100644 |
2056 |
--- a/pym/portage/package/ebuild/config.py |
2057 |
+++ b/pym/portage/package/ebuild/config.py |
2058 |
-@@ -305,6 +305,7 @@ class config(object): |
2059 |
+@@ -306,6 +306,7 @@ class config(object): |
2060 |
self.features = features_set(self) |
2061 |
self.features._features = copy.deepcopy(clone.features._features) |
2062 |
self._features_overrides = copy.deepcopy(clone._features_overrides) |
2063 |
@@ -708,7 +689,7 @@ index 1ac2cb1..2e31cf0 100644 |
2064 |
|
2065 |
#Strictly speaking _license_manager is not immutable. Users need to ensure that |
2066 |
#extract_global_changes() is called right after __init__ (if at all). |
2067 |
-@@ -944,6 +945,63 @@ class config(object): |
2068 |
+@@ -945,6 +946,63 @@ class config(object): |
2069 |
|
2070 |
self._validate_commands() |
2071 |
|
2072 |
@@ -772,7 +753,7 @@ index 1ac2cb1..2e31cf0 100644 |
2073 |
for k in self._case_insensitive_vars: |
2074 |
if k in self: |
2075 |
self[k] = self[k].lower() |
2076 |
-@@ -2778,6 +2836,10 @@ class config(object): |
2077 |
+@@ -2813,6 +2871,10 @@ class config(object): |
2078 |
if not eapi_exports_merge_type(eapi): |
2079 |
mydict.pop("MERGE_TYPE", None) |
2080 |
|
2081 |
@@ -783,8 +764,6 @@ index 1ac2cb1..2e31cf0 100644 |
2082 |
# Prefix variables are supported beginning with EAPI 3, or when |
2083 |
# force-prefix is in FEATURES, since older EAPIs would otherwise be |
2084 |
# useless with prefix configurations. This brings compatibility with |
2085 |
-diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py |
2086 |
-index 1878d1f..9fc17f7 100644 |
2087 |
--- a/pym/portage/package/ebuild/doebuild.py |
2088 |
+++ b/pym/portage/package/ebuild/doebuild.py |
2089 |
@@ -51,6 +51,7 @@ from portage import bsd_chflags, \ |
2090 |
@@ -795,17 +774,23 @@ index 1878d1f..9fc17f7 100644 |
2091 |
EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY, PORTAGE_PYM_PACKAGES, EPREFIX, MACOSSANDBOX_PROFILE |
2092 |
from portage.data import portage_gid, portage_uid, secpass, \ |
2093 |
uid, userpriv_groups |
2094 |
-@@ -71,7 +72,8 @@ from portage.output import colormap |
2095 |
- from portage.package.ebuild.prepare_build_dirs import prepare_build_dirs |
2096 |
- from portage.util import apply_recursive_permissions, \ |
2097 |
- apply_secpass_permissions, noiselimit, \ |
2098 |
-- writemsg, writemsg_stdout, write_atomic |
2099 |
-+ writemsg, writemsg_stdout, write_atomic, getconfig |
2100 |
+@@ -72,6 +73,7 @@ from portage.package.ebuild.prepare_buil |
2101 |
+ from portage.process import find_binary |
2102 |
+ from portage.util import ( apply_recursive_permissions, |
2103 |
+ apply_secpass_permissions, |
2104 |
++ getconfig, |
2105 |
+ noiselimit, |
2106 |
+ shlex_split, |
2107 |
+ varexpand, |
2108 |
+@@ -79,6 +81,7 @@ from portage.util import ( apply_recursi |
2109 |
+ writemsg_stdout, |
2110 |
+ write_atomic |
2111 |
+ ) |
2112 |
+from portage.util._path import exists_raise_eaccess |
2113 |
from portage.util.cpuinfo import get_cpu_count |
2114 |
from portage.util.lafilefixer import rewrite_lafile |
2115 |
- from portage.util.socks5 import get_socks5_proxy |
2116 |
-@@ -233,8 +235,27 @@ def _doebuild_path(settings, eapi=None): |
2117 |
+ from portage.util.compression_probe import _compressors |
2118 |
+@@ -241,8 +244,27 @@ def _doebuild_path(settings, eapi=None): |
2119 |
|
2120 |
for x in portage_bin_path: |
2121 |
path.append(os.path.join(x, "ebuild-helpers")) |
2122 |
@@ -834,11 +819,9 @@ index 1878d1f..9fc17f7 100644 |
2123 |
path.extend(rootpath) |
2124 |
path.extend(extrapath) |
2125 |
# END PREFIX LOCAL |
2126 |
-diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py |
2127 |
-index 265d0c9..2ec6ff4 100644 |
2128 |
--- a/pym/portage/package/ebuild/fetch.py |
2129 |
+++ b/pym/portage/package/ebuild/fetch.py |
2130 |
-@@ -43,6 +43,7 @@ from portage.output import colorize, EOutput |
2131 |
+@@ -43,6 +43,7 @@ from portage.output import colorize, EOu |
2132 |
from portage.util import apply_recursive_permissions, \ |
2133 |
apply_secpass_permissions, ensure_dirs, grabdict, shlex_split, \ |
2134 |
varexpand, writemsg, writemsg_level, writemsg_stdout |
2135 |
@@ -846,7 +829,7 @@ index 265d0c9..2ec6ff4 100644 |
2136 |
from portage.process import spawn |
2137 |
|
2138 |
_userpriv_spawn_kwargs = ( |
2139 |
-@@ -874,6 +875,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, |
2140 |
+@@ -874,6 +875,9 @@ def fetch(myuris, mysettings, listonly=0 |
2141 |
global_config_path = GLOBAL_CONFIG_PATH |
2142 |
if portage.const.EPREFIX: |
2143 |
global_config_path = os.path.join(portage.const.EPREFIX, |
2144 |
@@ -856,8 +839,6 @@ index 265d0c9..2ec6ff4 100644 |
2145 |
GLOBAL_CONFIG_PATH.lstrip(os.sep)) |
2146 |
|
2147 |
missing_file_param = False |
2148 |
-diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py |
2149 |
-index 3bccf6f..cacd637 100644 |
2150 |
--- a/pym/portage/sync/controller.py |
2151 |
+++ b/pym/portage/sync/controller.py |
2152 |
@@ -94,19 +94,20 @@ class SyncManager(object): |
2153 |
@@ -894,20 +875,18 @@ index 3bccf6f..cacd637 100644 |
2154 |
|
2155 |
def __getattr__(self, name): |
2156 |
if name == 'async': |
2157 |
-diff --git a/pym/portage/util/_dyn_libs/LinkageMapELF.py b/pym/portage/util/_dyn_libs/LinkageMapELF.py |
2158 |
-index 54a25e0..0296d3f 100644 |
2159 |
--- a/pym/portage/util/_dyn_libs/LinkageMapELF.py |
2160 |
+++ b/pym/portage/util/_dyn_libs/LinkageMapELF.py |
2161 |
-@@ -23,7 +23,7 @@ from portage.util import varexpand |
2162 |
- from portage.util import writemsg_level |
2163 |
- from portage.util._dyn_libs.NeededEntry import NeededEntry |
2164 |
- from portage.util.elf.header import ELFHeader |
2165 |
+@@ -12,7 +12,7 @@ from portage import _os_merge |
2166 |
+ from portage import _unicode_decode |
2167 |
+ from portage import _unicode_encode |
2168 |
+ from portage.cache.mappings import slot_dict_class |
2169 |
-from portage.const import EPREFIX |
2170 |
+from portage.const import BPREFIX |
2171 |
- |
2172 |
- if sys.hexversion >= 0x3000000: |
2173 |
- _unicode = str |
2174 |
-@@ -269,7 +269,7 @@ class LinkageMapELF(object): |
2175 |
+ from portage.dep.soname.multilib_category import compute_multilib_category |
2176 |
+ from portage.exception import CommandNotFound, InvalidData |
2177 |
+ from portage.localization import _ |
2178 |
+@@ -268,7 +268,7 @@ class LinkageMapELF(object): |
2179 |
continue |
2180 |
plibs.update((x, cpv) for x in items) |
2181 |
if plibs: |
2182 |
@@ -916,6 +895,3 @@ index 54a25e0..0296d3f 100644 |
2183 |
args.extend(os.path.join(root, x.lstrip("." + os.sep)) \ |
2184 |
for x in plibs) |
2185 |
try: |
2186 |
--- |
2187 |
-2.10.2 |
2188 |
- |
2189 |
|
2190 |
diff --git a/sys-apps/portage/files/portage-2.3.4-mj-safe-econf.patch b/sys-apps/portage/files/portage-2.3.4-mj-safe-econf.patch |
2191 |
deleted file mode 100644 |
2192 |
index 9cb9020bfc..0000000000 |
2193 |
--- a/sys-apps/portage/files/portage-2.3.4-mj-safe-econf.patch |
2194 |
+++ /dev/null |
2195 |
@@ -1,39 +0,0 @@ |
2196 |
-From c0153776be692d11a4af156e77bad50aa8c7bd12 Mon Sep 17 00:00:00 2001 |
2197 |
-From: Michael Haubenwallner <haubi@g.o> |
2198 |
-Date: Thu, 2 Mar 2017 10:37:19 +0100 |
2199 |
-Subject: [PATCH] econf: multijob-safe shebang tweaking |
2200 |
- |
2201 |
-Using econf in parallel for multiple configurations (multilib, or |
2202 |
-ncurses' wide+narrow), both may try to fix configure's shebang. |
2203 |
-On Cygwin at least, this may cause 'sed -i' to fail with: |
2204 |
- sed: cannot rename /.../work/ncurses-6.0/sedXZsjI6: Permission denied |
2205 |
-Instead of 'sed -i', better use 'mv -f' towards the original file. |
2206 |
---- |
2207 |
- bin/phase-helpers.sh | 8 ++++---- |
2208 |
- 1 file changed, 4 insertions(+), 4 deletions(-) |
2209 |
- |
2210 |
-diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh |
2211 |
-index 9e4e6a2..b72cb1a 100644 |
2212 |
---- a/bin/phase-helpers.sh |
2213 |
-+++ b/bin/phase-helpers.sh |
2214 |
-@@ -573,13 +573,13 @@ econf() { |
2215 |
- if [[ -n $CONFIG_SHELL && \ |
2216 |
- "$(head -n1 "$ECONF_SOURCE/configure")" =~ ^'#!'[[:space:]]*/bin/sh([[:space:]]|$) ]] ; then |
2217 |
- # preserve timestamp, see bug #440304 |
2218 |
-- touch -r "${ECONF_SOURCE}/configure" "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" || die |
2219 |
-+ cp "${ECONF_SOURCE}/configure" "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" || die |
2220 |
- sed -i \ |
2221 |
- -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \ |
2222 |
-- "${ECONF_SOURCE}/configure" \ |
2223 |
-+ "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" \ |
2224 |
- || die "Substition of shebang in '${ECONF_SOURCE}/configure' failed" |
2225 |
-- touch -r "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" "${ECONF_SOURCE}/configure" || die |
2226 |
-- rm -f "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" |
2227 |
-+ touch -r "${ECONF_SOURCE}/configure" "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" || die |
2228 |
-+ mv -f "${ECONF_SOURCE}/configure._portage_tmp_.${pid}" "${ECONF_SOURCE}/configure" || die |
2229 |
- fi |
2230 |
- if [ -e "${EPREFIX}"/usr/share/gnuconfig/ ]; then |
2231 |
- find "${WORKDIR}" -type f '(' \ |
2232 |
--- |
2233 |
-2.10.2 |
2234 |
- |
2235 |
|
2236 |
diff --git a/sys-apps/portage/portage-2.3.18.ebuild b/sys-apps/portage/portage-2.3.18.ebuild |
2237 |
index a7abe3406a..7e4bf1ab37 100644 |
2238 |
--- a/sys-apps/portage/portage-2.3.18.ebuild |
2239 |
+++ b/sys-apps/portage/portage-2.3.18.ebuild |
2240 |
@@ -93,7 +93,7 @@ python_prepare_all() { |
2241 |
|
2242 |
epatch "${FILESDIR}"/${PN}-2.3.10-ebuildshell.patch # 155161 |
2243 |
use prefix-chaining && |
2244 |
- epatch "${FILESDIR}"/${PN}-2.3.8-prefix-chaining.patch |
2245 |
+ epatch "${FILESDIR}"/${PN}-2.3.18-prefix-chaining.patch |
2246 |
|
2247 |
if use native-extensions; then |
2248 |
printf "[build_ext]\nportage-ext-modules=true\n" >> \ |