Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11572 - in main/branches/prefix: bin doc/package/ebuild/eapi man pym/_emerge pym/portage pym/portage/cache pym/portage/dbapi
Date: Sat, 27 Sep 2008 16:14:43
Message-Id: E1KjcRK-0005fM-QZ@stork.gentoo.org
1 Author: grobian
2 Date: 2008-09-27 16:14:37 +0000 (Sat, 27 Sep 2008)
3 New Revision: 11572
4
5 Modified:
6 main/branches/prefix/bin/ebuild.sh
7 main/branches/prefix/bin/isolated-functions.sh
8 main/branches/prefix/bin/repoman
9 main/branches/prefix/doc/package/ebuild/eapi/2.docbook
10 main/branches/prefix/man/emerge.1
11 main/branches/prefix/pym/_emerge/__init__.py
12 main/branches/prefix/pym/_emerge/help.py
13 main/branches/prefix/pym/portage/__init__.py
14 main/branches/prefix/pym/portage/cache/flat_hash.py
15 main/branches/prefix/pym/portage/cache/flat_list.py
16 main/branches/prefix/pym/portage/cache/metadata.py
17 main/branches/prefix/pym/portage/cache/sql_template.py
18 main/branches/prefix/pym/portage/cache/sqlite.py
19 main/branches/prefix/pym/portage/cache/template.py
20 main/branches/prefix/pym/portage/cache/util.py
21 main/branches/prefix/pym/portage/const.py
22 main/branches/prefix/pym/portage/dbapi/bintree.py
23 main/branches/prefix/pym/portage/dbapi/porttree.py
24 main/branches/prefix/pym/portage/dbapi/vartree.py
25 main/branches/prefix/pym/portage/output.py
26 Log:
27 Merged from trunk -r11544:11564
28
29 | 11545 | Use echo -e when splitting lines in e* functions, for |
30 | zmedico | compatibility with previous behavior wrt \e escape codes |
31 | | such as `elog "\e[31m***\e[0m"` for example. Thanks to |
32 | | Arfrever for finding this solution. |
33
34 | 11546 | Fix message: s/One or packages/One or more packages/. Thanks |
35 | zmedico | to Marijn Schouten <hkBst@g.o> for reporting. |
36
37 | 11547 | Ensure that cache modules always return a dict containing |
38 | zmedico | the _eclasses_ key. |
39
40 | 11548 | Fix mirror_cache() so it won't silently swallow a KeyError |
41 | zmedico | if _mtime_ or _eclass_ happens to be missing from the cache |
42 | | data for some reason. |
43
44 | 11549 | Add PROPERTIES to portage.auxdbkeys since it's been approved |
45 | zmedico | by the council. |
46
47 | 11550 | Bump to EAPI 2. |
48 | zmedico | |
49
50 | 11551 | Rename the EAPI 2 docs and to indicate that they are no |
51 | zmedico | longer a draft, and remove the EAPI 2_pre* docs. |
52
53 | 11552 | Make flat_hash write keys in alphabetical order. |
54 | zmedico | |
55
56 | 11553 | Fix a potential IndexError inside display_preserved_libs(). |
57 | zmedico | |
58
59 | 11554 | Direct EOutput.eerror() and ewarn() output to stderr. |
60 | zmedico | |
61
62 | 11555 | Handle possible CacheError inside mirror_cache(). |
63 | zmedico | |
64
65 | 11556 | Add back code removed in r11553 and fix logic to avoid |
66 | zmedico | IndexError. |
67
68 | 11558 | Bug #238766 - Revert the fetch() mirror:// behavior change |
69 | zmedico | from r11537 since it wasn't actually needed to comply with |
70 | | PMS 9.2.8, and the change actuall caused incorrect mirror |
71 | | fetching behavior. |
72
73 | 11560 | Update hardcoded auxdbkey_order attributes to include |
74 | zmedico | PROPERTIES. |
75
76 | 11561 | Add PROPERTIES to all of the metadata caches. |
77 | zmedico | |
78
79 | 11562 | Add PROPERTIES to the list of USE evaluated keys for the |
80 | zmedico | Packages index. |
81
82 | 11563 | Make $PWD default to $PORTAGE_BUILDDIR since $WORKDIR is |
83 | zmedico | sometimes created later. |
84
85 | 11564 | In the --depclean docs, there's no need to advise the user |
86 | zmedico | to use --oneshot when updating @system @world since @system |
87 | | now has world-candidate set to False by default. |
88
89
90 Modified: main/branches/prefix/bin/ebuild.sh
91 ===================================================================
92 --- main/branches/prefix/bin/ebuild.sh 2008-09-27 16:08:34 UTC (rev 11571)
93 +++ main/branches/prefix/bin/ebuild.sh 2008-09-27 16:14:37 UTC (rev 11572)
94 @@ -272,8 +272,8 @@
95 export EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} $*"
96 }
97
98 -# Ensure that $CWD is sane whenever possible.
99 -cd "$WORKDIR" 2>/dev/null
100 +# Ensure that $PWD is sane whenever possible.
101 +cd "$PORTAGE_BUILDDIR" 2>/dev/null
102
103 #if no perms are specified, dirs/files will have decent defaults
104 #(not secretive, but not stupid)
105 @@ -1031,7 +1031,7 @@
106 for f in ASFLAGS CATEGORY CBUILD CC CFLAGS CHOST CTARGET CXX \
107 CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \
108 FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS \
109 - LICENSE PDEPEND PF PKGUSE PROVIDE RDEPEND RESTRICT SLOT \
110 + LICENSE PDEPEND PF PKGUSE PROPERTIES PROVIDE RDEPEND RESTRICT SLOT \
111 KEYWORDS HOMEPAGE SRC_URI DESCRIPTION; do
112 [ -n "${!f}" ] && echo $(echo "${!f}" | \
113 tr '\n,\r,\t' ' , , ' | sed s/' \+'/' '/g) > ${f}
114 @@ -2071,8 +2071,8 @@
115
116 auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
117 DESCRIPTION KEYWORDS INHERITED IUSE CDEPEND PDEPEND PROVIDE EAPI
118 - UNUSED_01 UNUSED_02 UNUSED_03 UNUSED_04 UNUSED_05 UNUSED_06
119 - UNUSED_07"
120 + PROPERTIES UNUSED_06 UNUSED_05 UNUSED_04
121 + UNUSED_03 UNUSED_02 UNUSED_01"
122
123 #the extra $(echo) commands remove newlines
124 unset CDEPEND
125
126 Modified: main/branches/prefix/bin/isolated-functions.sh
127 ===================================================================
128 --- main/branches/prefix/bin/isolated-functions.sh 2008-09-27 16:08:34 UTC (rev 11571)
129 +++ main/branches/prefix/bin/isolated-functions.sh 2008-09-27 16:14:37 UTC (rev 11572)
130 @@ -181,7 +181,7 @@
131 # not entirely safe to use it as a delimiter in the log file since
132 # there can still be escaped newlines that will be expanded due to
133 # the echo -e parameter.
134 - echo "$@" | while read line ; do
135 + echo -e "$@" | while read line ; do
136 echo -ne "${messagetype} ${line}\n\0" >> \
137 "${T}/logging/${EBUILD_PHASE:-other}"
138 done
139 @@ -191,7 +191,7 @@
140 eqawarn() {
141 elog_base QA "$*"
142 [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
143 - echo "$@" | while read line ; do
144 + echo -e "$@" | while read line ; do
145 vecho -e " ${WARN}*${NORMAL} ${line}" >&2
146 done
147 LAST_E_CMD="eqawarn"
148 @@ -201,7 +201,7 @@
149 elog() {
150 elog_base LOG "$*"
151 [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
152 - echo "$@" | while read line ; do
153 + echo -e "$@" | while read line ; do
154 echo -e " ${GOOD}*${NORMAL} ${line}"
155 done
156 LAST_E_CMD="elog"
157 @@ -231,7 +231,7 @@
158 einfo() {
159 elog_base INFO "$*"
160 [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
161 - echo "$@" | while read line ; do
162 + echo -e "$@" | while read line ; do
163 echo -e " ${GOOD}*${NORMAL} ${line}"
164 done
165 LAST_E_CMD="einfo"
166 @@ -249,7 +249,7 @@
167 ewarn() {
168 elog_base WARN "$*"
169 [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
170 - echo "$@" | while read line ; do
171 + echo -e "$@" | while read line ; do
172 echo -e " ${WARN}*${NORMAL} ${RC_INDENTATION}${line}" >&2
173 done
174 LAST_E_CMD="ewarn"
175 @@ -259,7 +259,7 @@
176 eerror() {
177 elog_base ERROR "$*"
178 [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
179 - echo "$@" | while read line ; do
180 + echo -e "$@" | while read line ; do
181 echo -e " ${BAD}*${NORMAL} ${RC_INDENTATION}${line}" >&2
182 done
183 LAST_E_CMD="eerror"
184
185 Modified: main/branches/prefix/bin/repoman
186 ===================================================================
187 --- main/branches/prefix/bin/repoman 2008-09-27 16:08:34 UTC (rev 11571)
188 +++ main/branches/prefix/bin/repoman 2008-09-27 16:14:37 UTC (rev 11572)
189 @@ -533,9 +533,8 @@
190 root_config = RootConfig(repoman_settings, trees["/"], setconfig)
191 # We really only need to cache the metadata that's necessary for visibility
192 # filtering. Anything else can be discarded to reduce memory consumption.
193 -for k in ("DEPEND", "LICENCE", "PDEPEND",
194 - "PROVIDE", "RDEPEND", "RESTRICT", "repository"):
195 - portdb._aux_cache_keys.discard(k)
196 +portdb._aux_cache_keys.clear()
197 +portdb._aux_cache_keys.update(["EAPI", "KEYWORDS", "SLOT"])
198 # dep_zapdeps looks at the vardbapi, but it shouldn't for repoman.
199 del trees["/"]["vartree"]
200
201
202 Modified: main/branches/prefix/doc/package/ebuild/eapi/2.docbook
203 ===================================================================
204 --- main/branches/prefix/doc/package/ebuild/eapi/2.docbook 2008-09-27 16:08:34 UTC (rev 11571)
205 +++ main/branches/prefix/doc/package/ebuild/eapi/2.docbook 2008-09-27 16:14:37 UTC (rev 11572)
206 @@ -1,289 +1,10 @@
207 -<section id='package-ebuild-eapi-2_pre1'>
208 - <title>EAPI 2_pre1</title>
209 +<section id='package-ebuild-eapi-2'>
210 + <title>EAPI 2</title>
211 <section id='package-ebuild-eapi-2-helpers'>
212 <title>Helpers</title>
213 <section id='package-ebuild-eapi-2-helpers-doman'>
214 <title>doman</title>
215 - <para>
216 - Language codes in file names are now used for path translation.
217 - </para>
218 - <table><title>Man Page Path Translation</title>
219 - <tgroup cols='2' align='left' >
220 - <colspec colname='source'/>
221 - <colspec colname='destination'/>
222 - <thead>
223 - <row>
224 - <entry>Source</entry>
225 - <entry>Destination</entry>
226 - </row>
227 - </thead>
228 - <tbody>
229 - <row>
230 - <entry>foo.1</entry>
231 - <entry>/usr/share/man/man1/foo.1</entry>
232 - </row>
233 - <row>
234 - <entry>foo.lang.1</entry>
235 - <entry>/usr/share/man/lang/man1/foo.1</entry>
236 - </row>
237 - </tbody>
238 - </tgroup>
239 - </table>
240 - </section>
241 - </section>
242 - <section id='package-ebuild-eapi-2-use-deps'>
243 - <title>USE Dependencies</title>
244 - <section id='package-ebuild-eapi-2-use-deps-unconditional'>
245 - <title>Unconditional USE Dependencies</title>
246 - <table><title>Syntax Examples</title>
247 - <tgroup cols='2' align='left' >
248 - <colspec colname='example'/>
249 - <colspec colname='meaning'/>
250 - <thead>
251 - <row>
252 - <entry>Example</entry>
253 - <entry>Meaning</entry>
254 - </row>
255 - </thead>
256 - <tbody>
257 - <row>
258 - <entry>foo[bar]</entry>
259 - <entry>foo must have bar enabled</entry>
260 - </row>
261 - <row>
262 - <entry>foo[bar,baz]</entry>
263 - <entry>foo must have both bar and baz enabled</entry>
264 - </row>
265 - <row>
266 - <entry>foo[-bar,baz]</entry>
267 - <entry>foo must have bar disabled and baz enabled</entry>
268 - </row>
269 - </tbody>
270 - </tgroup>
271 - </table>
272 - </section>
273 - <section id='package-ebuild-eapi-2-use-deps-conditional'>
274 - <title>Conditional USE Dependencies</title>
275 - <table><title>Syntax Examples</title>
276 - <tgroup cols='2' align='left' >
277 - <colspec colname='compact'/>
278 - <colspec colname='expanded'/>
279 - <thead>
280 - <row>
281 - <entry>Compact Form</entry>
282 - <entry>Equivalent Expanded Form</entry>
283 - </row>
284 - </thead>
285 - <tbody>
286 - <row>
287 - <entry>foo[bar?]</entry>
288 - <entry>bar? ( foo[bar] ) !bar? ( foo )</entry>
289 - </row>
290 - <row>
291 - <entry>foo[!bar?]</entry>
292 - <entry>bar? ( foo ) !bar? ( foo[-bar] )</entry>
293 - </row>
294 - <row>
295 - <entry>foo[bar=]</entry>
296 - <entry>bar? ( foo[bar] ) !bar? ( foo[-bar] )</entry>
297 - </row>
298 - <row>
299 - <entry>foo[!bar=]</entry>
300 - <entry>bar? ( foo[-bar] ) !bar? ( foo[bar] )</entry>
301 - </row>
302 - </tbody>
303 - </tgroup>
304 - </table>
305 - </section>
306 - </section>
307 -</section>
308 -<section id='package-ebuild-eapi-2_pre2'>
309 - <title>EAPI 2_pre2</title>
310 - <section id='package-ebuild-eapi-2-phases'>
311 - <title>Phases</title>
312 - <section id='package-ebuild-eapi-2-phases-src-configure'>
313 - <title>New src_configure Phase Function</title>
314 - <para>
315 - The configure portion of the src_compile function has been
316 - split into a separate function which is named src_configure. The
317 - src_configure function is called in-between the src_unpack and
318 - src_compile functions.
319 - </para>
320 - <programlisting>
321 -src_configure() {
322 - if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
323 - econf
324 - fi
325 -}
326 -
327 -src_compile() {
328 - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ] ; then
329 - emake || die "emake failed"
330 - fi
331 -}
332 - </programlisting>
333 - <table><title>Execution Order of Phase Functions</title>
334 - <tgroup cols='1' align='left' >
335 - <colspec colname='name'/>
336 - <thead>
337 - <row>
338 - <entry>Phase Function Name</entry>
339 - </row>
340 - </thead>
341 - <tbody>
342 - <row>
343 - <entry>pkg_setup</entry>
344 - </row>
345 - <row>
346 - <entry>src_unpack</entry>
347 - </row>
348 - <row>
349 - <entry>src_configure</entry>
350 - </row>
351 - <row>
352 - <entry>src_compile</entry>
353 - </row>
354 - <row>
355 - <entry>src_test</entry>
356 - </row>
357 - <row>
358 - <entry>src_install</entry>
359 - </row>
360 - <row>
361 - <entry>pkg_preinst</entry>
362 - </row>
363 - <row>
364 - <entry>pkg_postinst</entry>
365 - </row>
366 - <row>
367 - <entry>pkg_prerm</entry>
368 - </row>
369 - <row>
370 - <entry>pkg_postrm</entry>
371 - </row>
372 - </tbody>
373 - </tgroup>
374 - </table>
375 - </section>
376 - <section id='package-ebuild-eapi-2-phases-default-functions'>
377 - <title>Default Phase Functions</title>
378 - <para>
379 - The default pkg_nofetch and src_* phase functions are now
380 - accessible via a function having a name
381 - that begins with default_ and
382 - ends with the respective phase function name. For example,
383 - a call to a function with the name default_src_compile is
384 - equivalent to a call to the default src_compile
385 - implementation.
386 - </para>
387 - <table><title>Default Phase Functions</title>
388 - <tgroup cols='1' align='left' >
389 - <colspec colname='name'/>
390 - <thead>
391 - <row>
392 - <entry>Function Name</entry>
393 - </row>
394 - </thead>
395 - <tbody>
396 - <row>
397 - <entry>default_pkg_nofetch</entry>
398 - </row>
399 - <row>
400 - <entry>default_src_unpack</entry>
401 - </row>
402 - <row>
403 - <entry>default_src_configure</entry>
404 - </row>
405 - <row>
406 - <entry>default_src_compile</entry>
407 - </row>
408 - <row>
409 - <entry>default_src_test</entry>
410 - </row>
411 - </tbody>
412 - </tgroup>
413 - </table>
414 - </section>
415 - <section id='package-ebuild-eapi-2-phases-default-function-alias'>
416 - <title>Default Phase Function Alias</title>
417 - <para>
418 - A function named "default" is redefined for each phase so that it
419 - will call the default_* function corresponding to the current phase.
420 - For example, a call to the function named "default" during the
421 - src_compile phase is equivalent to a call to the function named
422 - default_src_compile.
423 - </para>
424 - </section>
425 - </section>
426 -</section>
427 -<section id='package-ebuild-eapi-2-pre3'>
428 - <title>EAPI 2_pre3</title>
429 - <section id='package-ebuild-eapi-2-pre3-metadata'>
430 - <title>Metadata</title>
431 - <section id='package-ebuild-eapi-2-pre3-metadata-dependencies'>
432 - <title>Dependencies</title>
433 - <section id='package-ebuild-eapi-2-pre3-metadata-dependencies-blocker-atoms'>
434 - <title>Blocker Atoms</title>
435 - <section id='package-ebuild-eapi-2-pre3-metadata-dependencies-blocker-atoms-new-meaning'>
436 - <title>New Meaning for Old Syntax</title>
437 - <para>
438 - Blocker atoms which use the previously existing !atom syntax now have
439 - a slightly different meaning. These blocker atoms indicate that
440 - conflicting packages may be temporarily installed simultaneously. When
441 - temporary simultaneous installation of conflicting packages occurs, the
442 - installation of a newer package may overwrite any colliding files that
443 - belong to an older package which is explicitly blocked. When such file
444 - collisions occur, the colliding files cease to belong to the older
445 - package, and they remain installed after the older package is
446 - eventually uninstalled. The older package is uninstalled only after
447 - any newer blocking packages have been merged on top of it.
448 - </para>
449 - </section>
450 - <section id='package-ebuild-eapi-2-pre3-metadata-dependencies-blocker-atoms-new-syntax'>
451 - <title>New !!atom Syntax</title>
452 - <para>
453 - A new !!atom syntax is now supported, for use in special cases for which
454 - temporary simultaneous installation of conflicting packages should not be
455 - allowed. If a given package happens to be blocked my a mixture of atoms
456 - consisting of both the !atom and !!atom syntaxes, the !!atom syntax takes
457 - precedence over the !atom syntax.
458 - </para>
459 - </section>
460 - </section>
461 - </section>
462 - <section id='package-ebuild-eapi-2-pre3-metadata-src-uri'>
463 - <title>SRC_URI</title>
464 - <section id='package-ebuild-eapi-2-pre3-metadata-src-uri-output-file-name-customization'>
465 - <title>Customization of Output File Names</title>
466 - <para>
467 - A new syntax is supported which allows customization of the output
468 - file name for a given URI. In order to customize the output file
469 - name, a given URI should be followed by a "->" operator which,
470 - in turn, should be followed by the desired output file name. As
471 - usual, all tokens, including the operator and output file name,
472 - should be separated by whitespace.
473 - </para>
474 - </section>
475 - </section>
476 - </section>
477 - <section id='package-ebuild-eapi-2-pre3-phases'>
478 - <title>Phases</title>
479 - <section id='package-ebuild-eapi-2-pre3-phases-src-prepare'>
480 - <title>New src_prepare Phase Function</title>
481 - <para>
482 - A new src_prepare function is called after the src_unpack
483 - function, with cwd initially set to $S.
484 - </para>
485 - </section>
486 - </section>
487 -</section>
488 -<section id='package-ebuild-eapi-2-draft'>
489 - <title>EAPI 2 Draft</title>
490 - <section id='package-ebuild-eapi-2-draft-helpers'>
491 - <title>Helpers</title>
492 - <section id='package-ebuild-eapi-2-draft-helpers-doman'>
493 - <title>doman</title>
494 - <section id='package-ebuild-eapi-2-draft-helpers-doman-language-codes'>
495 + <section id='package-ebuild-eapi-2-helpers-doman-language-codes'>
496 <title>Recognition of Language Codes in File Names</title>
497 <para>
498 Language codes in file names are now used for path translation.
499 @@ -313,13 +34,13 @@
500 </section>
501 </section>
502 </section>
503 - <section id='package-ebuild-eapi-2-draft-metadata'>
504 + <section id='package-ebuild-eapi-2-metadata'>
505 <title>Metadata</title>
506 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies'>
507 + <section id='package-ebuild-eapi-2-metadata-dependencies'>
508 <title>Dependencies</title>
509 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies-blocker-atoms'>
510 + <section id='package-ebuild-eapi-2-metadata-dependencies-blocker-atoms'>
511 <title>Blocker Atoms</title>
512 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies-blocker-atoms-new-meaning'>
513 + <section id='package-ebuild-eapi-2-metadata-dependencies-blocker-atoms-new-meaning'>
514 <title>New Meaning for Old Syntax</title>
515 <para>
516 Blocker atoms which use the previously existing !atom syntax now have
517 @@ -334,7 +55,7 @@
518 any newer blocking packages have been merged on top of it.
519 </para>
520 </section>
521 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies-blocker-atoms-new-syntax'>
522 + <section id='package-ebuild-eapi-2-metadata-dependencies-blocker-atoms-new-syntax'>
523 <title>New !!atom Syntax</title>
524 <para>
525 A new !!atom syntax is now supported, for use in special cases for which
526 @@ -345,9 +66,9 @@
527 </para>
528 </section>
529 </section>
530 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies-use'>
531 + <section id='package-ebuild-eapi-2-metadata-dependencies-use'>
532 <title>USE Dependencies</title>
533 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies-use-unconditional'>
534 + <section id='package-ebuild-eapi-2-metadata-dependencies-use-unconditional'>
535 <title>Unconditional USE Dependencies</title>
536 <table><title>Syntax Examples</title>
537 <tgroup cols='2' align='left' >
538 @@ -376,7 +97,7 @@
539 </tgroup>
540 </table>
541 </section>
542 - <section id='package-ebuild-eapi-2-draft-metadata-dependencies-use-conditional'>
543 + <section id='package-ebuild-eapi-2-metadata-dependencies-use-conditional'>
544 <title>Conditional USE Dependencies</title>
545 <table><title>Syntax Examples</title>
546 <tgroup cols='2' align='left' >
547 @@ -411,9 +132,9 @@
548 </section>
549 </section>
550 </section>
551 - <section id='package-ebuild-eapi-2-draft-metadata-src-uri'>
552 + <section id='package-ebuild-eapi-2-metadata-src-uri'>
553 <title>SRC_URI</title>
554 - <section id='package-ebuild-eapi-2-draft-metadata-src-uri-output-file-name-customization'>
555 + <section id='package-ebuild-eapi-2-metadata-src-uri-output-file-name-customization'>
556 <title>Customization of Output File Names</title>
557 <para>
558 A new syntax is supported which allows customization of the output
559 @@ -426,16 +147,16 @@
560 </section>
561 </section>
562 </section>
563 - <section id='package-ebuild-eapi-2-draft-phases'>
564 + <section id='package-ebuild-eapi-2-phases'>
565 <title>Phases</title>
566 - <section id='package-ebuild-eapi-2-draft-phases-src-prepare'>
567 + <section id='package-ebuild-eapi-2-phases-src-prepare'>
568 <title>New src_prepare Phase Function</title>
569 <para>
570 A new src_prepare function is called after the src_unpack
571 function, with cwd initially set to $S.
572 </para>
573 </section>
574 - <section id='package-ebuild-eapi-2-draft-phases-src-configure'>
575 + <section id='package-ebuild-eapi-2-phases-src-configure'>
576 <title>New src_configure Phase Function</title>
577 <para>
578 The configure portion of the src_compile function has been
579 @@ -457,7 +178,7 @@
580 }
581 </programlisting>
582 </section>
583 - <section id='package-ebuild-eapi-2-draft-phases-order'>
584 + <section id='package-ebuild-eapi-2-phases-order'>
585 <title>Execution Order of Phase Functions</title>
586 <table><title>Execution Order of Phase Functions</title>
587 <tgroup cols='1' align='left' >
588 @@ -505,7 +226,7 @@
589 </tgroup>
590 </table>
591 </section>
592 - <section id='package-ebuild-eapi-2-draft-phases-default-functions'>
593 + <section id='package-ebuild-eapi-2-phases-default-functions'>
594 <title>Default Phase Functions</title>
595 <para>
596 The default pkg_nofetch and src_* phase functions are now
597 @@ -547,7 +268,7 @@
598 </tgroup>
599 </table>
600 </section>
601 - <section id='package-ebuild-eapi-2-draft-phases-default-function-alias'>
602 + <section id='package-ebuild-eapi-2-phases-default-function-alias'>
603 <title>Default Phase Function Alias</title>
604 <para>
605 A function named "default" is redefined for each phase so that it
606
607 Modified: main/branches/prefix/man/emerge.1
608 ===================================================================
609 --- main/branches/prefix/man/emerge.1 2008-09-27 16:08:34 UTC (rev 11571)
610 +++ main/branches/prefix/man/emerge.1 2008-09-27 16:14:37 UTC (rev 11572)
611 @@ -114,7 +114,7 @@
612 \-\-noreplace <atom>\fR. As a safety measure, depclean will not remove any
613 packages unless *all* required dependencies have been resolved. As a
614 consequence, it is often necessary to run \fIemerge \-\-update \-\-newuse
615 -\-\-deep \-\-oneshot @system @world\fR prior to depclean.
616 +\-\-deep @system @world\fR prior to depclean.
617
618 \fBWARNING:\fR
619 Inexperienced users are advised to use \fB\-\-pretend\fR with this
620
621 Modified: main/branches/prefix/pym/_emerge/__init__.py
622 ===================================================================
623 --- main/branches/prefix/pym/_emerge/__init__.py 2008-09-27 16:08:34 UTC (rev 11571)
624 +++ main/branches/prefix/pym/_emerge/__init__.py 2008-09-27 16:14:37 UTC (rev 11572)
625 @@ -1439,7 +1439,7 @@
626 "CHOST", "COUNTER", "DEPEND", "EAPI",
627 "INHERITED", "IUSE", "KEYWORDS",
628 "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
629 - "repository", "RESTRICT", "SLOT", "USE", "_mtime_", "EPREFIX" ]
630 + "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE", "_mtime_", "EPREFIX" ]
631
632 def __init__(self, **kwargs):
633 Task.__init__(self, **kwargs)
634 @@ -10086,7 +10086,7 @@
635 if e is not None:
636 mydepgraph.display_problems()
637 out = portage.output.EOutput()
638 - out.eerror("One or packages are either masked or " + \
639 + out.eerror("One or more packages are either masked or " + \
640 "have missing dependencies:")
641 out.eerror("")
642 indent = " "
643 @@ -10935,10 +10935,12 @@
644 owners = vardbapi._owners.getFileOwnerMap(consumers[:MAX_DISPLAY+2])
645 for c in consumers[:MAX_DISPLAY]:
646 print colorize("WARN", " * ") + " used by %s (%s)" % (c, ", ".join([x.mycpv for x in owners[c]]))
647 - if len(consumers) > MAX_DISPLAY + 1:
648 + if len(consumers) == MAX_DISPLAY + 1:
649 + print colorize("WARN", " * ") + " used by %s (%s)" % \
650 + (consumers[MAX_DISPLAY], ", ".join(
651 + x.mycpv for x in owners[consumers[MAX_DISPLAY]]))
652 + elif len(consumers) > MAX_DISPLAY:
653 print colorize("WARN", " * ") + " used by %d other files" % (len(consumers) - MAX_DISPLAY)
654 - else:
655 - print colorize("WARN", " * ") + " used by %s (%s)" % (consumers[MAX_DISPLAY], ", ".join([x.mycpv for x in owners[consumers[MAX_DISPLAY]]]))
656 print "Use " + colorize("GOOD", "emerge @preserved-rebuild") + " to rebuild packages using these libraries"
657
658
659 @@ -11997,7 +11999,7 @@
660 msg.append("unless *all* required dependencies have been resolved. As a\n")
661 msg.append("consequence, it is often necessary to run %s\n" % \
662 good("`emerge --update"))
663 - msg.append(good("--newuse --deep --oneshot @system @world`") + \
664 + msg.append(good("--newuse --deep @system @world`") + \
665 " prior to depclean.\n")
666
667 if action == "depclean" and "--quiet" not in myopts and not myfiles:
668 @@ -12805,7 +12807,7 @@
669 out.eerror("")
670
671 if isinstance(e, depgraph.UnsatisfiedResumeDep):
672 - out.eerror("One or packages are either masked or " + \
673 + out.eerror("One or more packages are either masked or " + \
674 "have missing dependencies:")
675 out.eerror("")
676 indent = " "
677
678 Modified: main/branches/prefix/pym/_emerge/help.py
679 ===================================================================
680 --- main/branches/prefix/pym/_emerge/help.py 2008-09-27 16:08:34 UTC (rev 11571)
681 +++ main/branches/prefix/pym/_emerge/help.py 2008-09-27 16:14:37 UTC (rev 11572)
682 @@ -79,7 +79,7 @@
683 "emerge --noreplace <atom>. As a safety measure, depclean " + \
684 "will not remove any packages unless *all* required dependencies " + \
685 "have been resolved. As a consequence, it is often necessary to " + \
686 - "run emerge --update --newuse --deep --oneshot @system @world " + \
687 + "run emerge --update --newuse --deep @system @world " + \
688 "prior to depclean."
689
690 for line in wrap(paragraph, desc_width):
691
692 Modified: main/branches/prefix/pym/portage/__init__.py
693 ===================================================================
694 --- main/branches/prefix/pym/portage/__init__.py 2008-09-27 16:08:34 UTC (rev 11571)
695 +++ main/branches/prefix/pym/portage/__init__.py 2008-09-27 16:14:37 UTC (rev 11572)
696 @@ -3528,13 +3528,7 @@
697 eidx = myuri.find("/", 9)
698 if eidx != -1:
699 mirrorname = myuri[9:eidx]
700 - if myfile != os.path.basename(myuri):
701 - # If a SRC_URI arrow is used together with
702 - # mirror://, preserve the remote path that's
703 - # specified within the uri.
704 - path = myuri[eidx+1:]
705 - else:
706 - path = myfile
707 + path = myuri[eidx+1:]
708
709 # Try user-defined mirrors first
710 if mirrorname in custommirrors:
711 @@ -6891,8 +6885,8 @@
712 'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION',
713 'KEYWORDS', 'INHERITED', 'IUSE', 'CDEPEND',
714 'PDEPEND', 'PROVIDE', 'EAPI',
715 - 'UNUSED_01', 'UNUSED_02', 'UNUSED_03', 'UNUSED_04',
716 - 'UNUSED_05', 'UNUSED_06', 'UNUSED_07',
717 + 'PROPERTIES', 'UNUSED_06', 'UNUSED_05', 'UNUSED_04',
718 + 'UNUSED_03', 'UNUSED_02', 'UNUSED_01',
719 ]
720 auxdbkeylen=len(auxdbkeys)
721
722
723 Modified: main/branches/prefix/pym/portage/cache/flat_hash.py
724 ===================================================================
725 --- main/branches/prefix/pym/portage/cache/flat_hash.py 2008-09-27 16:08:34 UTC (rev 11571)
726 +++ main/branches/prefix/pym/portage/cache/flat_hash.py 2008-09-27 16:14:37 UTC (rev 11572)
727 @@ -16,7 +16,9 @@
728 super(database,self).__init__(*args, **config)
729 self.location = os.path.join(self.location,
730 self.label.lstrip(os.path.sep).rstrip(os.path.sep))
731 -
732 + write_keys = set(self._known_keys)
733 + write_keys.add("_eclasses_")
734 + self._write_keys = sorted(write_keys)
735 if not self.readonly and not os.path.exists(self.location):
736 self._ensure_dirs()
737
738 @@ -46,6 +48,8 @@
739 raise cache_errors.CacheCorruption(cpv, e)
740 if "_eclasses_" in d:
741 d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
742 + else:
743 + d["_eclasses_"] = {}
744 return d
745
746 for x in self._known_keys:
747 @@ -71,13 +75,14 @@
748 else:
749 raise cache_errors.CacheCorruption(cpv, e)
750
751 - for k, v in values.iteritems():
752 - if not v:
753 - continue
754 - if k != "_mtime_" and (k == "_eclasses_" or k in self._known_keys):
755 + try:
756 + for k in self._write_keys:
757 + v = values.get(k)
758 + if not v:
759 + continue
760 myf.write("%s=%s\n" % (k, v))
761 -
762 - myf.close()
763 + finally:
764 + myf.close()
765 self._ensure_access(fp, mtime=values["_mtime_"])
766
767 #update written. now we move it.
768
769 Modified: main/branches/prefix/pym/portage/cache/flat_list.py
770 ===================================================================
771 --- main/branches/prefix/pym/portage/cache/flat_list.py 2008-09-27 16:08:34 UTC (rev 11571)
772 +++ main/branches/prefix/pym/portage/cache/flat_list.py 2008-09-27 16:14:37 UTC (rev 11572)
773 @@ -11,7 +11,7 @@
774 auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
775 'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION',
776 'KEYWORDS', 'IUSE', 'CDEPEND',
777 - 'PDEPEND', 'PROVIDE','_eclasses_')
778 + 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES')
779
780 def __init__(self, label, auxdbkeys, **config):
781 super(database,self).__init__(label, auxdbkeys, **config)
782
783 Modified: main/branches/prefix/pym/portage/cache/metadata.py
784 ===================================================================
785 --- main/branches/prefix/pym/portage/cache/metadata.py 2008-09-27 16:08:34 UTC (rev 11571)
786 +++ main/branches/prefix/pym/portage/cache/metadata.py 2008-09-27 16:14:37 UTC (rev 11572)
787 @@ -18,7 +18,7 @@
788 auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
789 'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION',
790 'KEYWORDS', 'INHERITED', 'IUSE', 'CDEPEND',
791 - 'PDEPEND', 'PROVIDE', 'EAPI')
792 + 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES')
793
794 autocommits = True
795
796 @@ -66,6 +66,8 @@
797 if "INHERITED" in d:
798 d["_eclasses_"] = self.ec.get_eclass_data(d["INHERITED"].split(), from_master_only=True)
799 del d["INHERITED"]
800 + else:
801 + d["_eclasses_"] = {}
802 elif isinstance(d["_eclasses_"], basestring):
803 # We skip this if flat_hash.database._parse_data() was called above
804 # because it calls reconstruct_eclasses() internally.
805
806 Modified: main/branches/prefix/pym/portage/cache/sql_template.py
807 ===================================================================
808 --- main/branches/prefix/pym/portage/cache/sql_template.py 2008-09-27 16:08:34 UTC (rev 11571)
809 +++ main/branches/prefix/pym/portage/cache/sql_template.py 2008-09-27 16:14:37 UTC (rev 11572)
810 @@ -238,6 +238,8 @@
811 d = dict(l)
812 if "_eclasses_" in d:
813 d["_eclasses_"] = reconstruct_eclasses(oldcpv, d["_eclasses_"])
814 + else:
815 + d["_eclasses_"] = {}
816 yield cpv, d
817 l.clear()
818 oldcpv = x
819 @@ -246,6 +248,8 @@
820 d = dict(l)
821 if "_eclasses_" in d:
822 d["_eclasses_"] = reconstruct_eclasses(oldcpv, d["_eclasses_"])
823 + else:
824 + d["_eclasses_"] = {}
825 yield cpv, d
826
827 def commit(self):
828
829 Modified: main/branches/prefix/pym/portage/cache/sqlite.py
830 ===================================================================
831 --- main/branches/prefix/pym/portage/cache/sqlite.py 2008-09-27 16:08:34 UTC (rev 11571)
832 +++ main/branches/prefix/pym/portage/cache/sqlite.py 2008-09-27 16:14:37 UTC (rev 11572)
833 @@ -170,6 +170,8 @@
834 pass #writemsg("%s: %s\n" % (cpv, str(e)))
835 if "_eclasses_" in d:
836 d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
837 + else:
838 + d["_eclasses_"] = {}
839 for x in self._known_keys:
840 d.setdefault(x,'')
841 return d
842
843 Modified: main/branches/prefix/pym/portage/cache/template.py
844 ===================================================================
845 --- main/branches/prefix/pym/portage/cache/template.py 2008-09-27 16:08:34 UTC (rev 11571)
846 +++ main/branches/prefix/pym/portage/cache/template.py 2008-09-27 16:14:37 UTC (rev 11572)
847 @@ -37,6 +37,8 @@
848 d=self._getitem(cpv)
849 if self.serialize_eclasses and "_eclasses_" in d:
850 d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
851 + elif "_eclasses_" not in d:
852 + d["_eclasses_"] = {}
853 return d
854
855 def _getitem(self, cpv):
856
857 Modified: main/branches/prefix/pym/portage/cache/util.py
858 ===================================================================
859 --- main/branches/prefix/pym/portage/cache/util.py 2008-09-27 16:08:34 UTC (rev 11571)
860 +++ main/branches/prefix/pym/portage/cache/util.py 2008-09-27 16:14:37 UTC (rev 11572)
861 @@ -39,12 +39,16 @@
862 trg = None
863 try:
864 trg = trg_cache[x]
865 - if long(trg["_mtime_"]) == long(entry["_mtime_"]) and \
866 - eclass_cache.is_eclass_data_valid(trg["_eclasses_"]) and \
867 - set(trg["_eclasses_"]) == set(entry["_eclasses_"]):
868 - write_it = False
869 - except (cache_errors.CacheError, KeyError):
870 + except (KeyError, cache_errors.CacheError):
871 pass
872 + else:
873 + try:
874 + if long(trg["_mtime_"]) == long(entry["_mtime_"]) and \
875 + eclass_cache.is_eclass_data_valid(trg["_eclasses_"]) and \
876 + set(trg["_eclasses_"]) == set(entry["_eclasses_"]):
877 + write_it = False
878 + except cache_errors.CacheError:
879 + pass
880
881 if trg and not write_it:
882 """ We don't want to skip the write unless we're really sure that
883
884 Modified: main/branches/prefix/pym/portage/const.py
885 ===================================================================
886 --- main/branches/prefix/pym/portage/const.py 2008-09-27 16:08:34 UTC (rev 11571)
887 +++ main/branches/prefix/pym/portage/const.py 2008-09-27 16:14:37 UTC (rev 11572)
888 @@ -84,7 +84,7 @@
889 "package", "preinst", "postinst","prerm", "postrm",
890 "nofetch", "config", "info", "other"]
891
892 -EAPI = 1
893 +EAPI = 2
894
895 HASHING_BLOCKSIZE = 32768
896 MANIFEST1_HASH_FUNCTIONS = ["MD5","SHA256","RMD160"]
897
898 Modified: main/branches/prefix/pym/portage/dbapi/bintree.py
899 ===================================================================
900 --- main/branches/prefix/pym/portage/dbapi/bintree.py 2008-09-27 16:08:34 UTC (rev 11571)
901 +++ main/branches/prefix/pym/portage/dbapi/bintree.py 2008-09-27 16:14:37 UTC (rev 11572)
902 @@ -33,7 +33,7 @@
903 # Selectively cache metadata in order to optimize dep matching.
904 self._aux_cache_keys = set(
905 ["CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS",
906 - "LICENSE", "PDEPEND", "PROVIDE",
907 + "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE",
908 "RDEPEND", "repository", "RESTRICT", "SLOT", "USE",
909 "EPREFIX"])
910 self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys)
911 @@ -156,10 +156,13 @@
912 self._pkgindex_keys.update(["CPV", "MTIME", "SIZE"])
913 self._pkgindex_aux_keys = \
914 ["CHOST", "DEPEND", "DESCRIPTION", "EAPI",
915 - "IUSE", "KEYWORDS", "LICENSE", "PDEPEND",
916 + "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES",
917 "PROVIDE", "RDEPEND", "repository", "SLOT", "USE",
918 "EPREFIX"]
919 self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
920 + self._pkgindex_use_evaluated_keys = \
921 + ("LICENSE", "RDEPEND", "DEPEND",
922 + "PDEPEND", "PROPERTIES", "PROVIDE")
923 self._pkgindex_header_keys = set(["ACCEPT_KEYWORDS", "CBUILD",
924 "CHOST", "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES",
925 "GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE", "EAPI", "EPREFIX"])
926 @@ -175,6 +178,7 @@
927 "LICENSE" : "",
928 "PATH" : "",
929 "PDEPEND" : "",
930 + "PROPERTIES" : "",
931 "PROVIDE" : "",
932 "RDEPEND" : "",
933 "RESTRICT": "",
934 @@ -913,7 +917,7 @@
935 metadata["USE"] = " ".join(use)
936 from portage.dep import paren_reduce, use_reduce, \
937 paren_normalize, paren_enclose
938 - for k in "LICENSE", "RDEPEND", "DEPEND", "PDEPEND", "PROVIDE":
939 + for k in self._pkgindex_use_evaluated_keys:
940 try:
941 deps = paren_reduce(metadata[k])
942 deps = use_reduce(deps, uselist=raw_use)
943
944 Modified: main/branches/prefix/pym/portage/dbapi/porttree.py
945 ===================================================================
946 --- main/branches/prefix/pym/portage/dbapi/porttree.py 2008-09-27 16:08:34 UTC (rev 11571)
947 +++ main/branches/prefix/pym/portage/dbapi/porttree.py 2008-09-27 16:14:37 UTC (rev 11572)
948 @@ -172,6 +172,7 @@
949 # XXX: REMOVE THIS ONCE UNUSED_0 IS YANKED FROM auxdbkeys
950 # ~harring
951 filtered_auxdbkeys = filter(lambda x: not x.startswith("UNUSED_0"), auxdbkeys)
952 + filtered_auxdbkeys.sort()
953 if secpass < 1:
954 from portage.cache import metadata_overlay, volatile
955 for x in self.porttrees:
956 @@ -194,7 +195,7 @@
957 # Selectively cache metadata in order to optimize dep matching.
958 self._aux_cache_keys = set(
959 ["DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS", "LICENSE",
960 - "PDEPEND", "PROVIDE", "RDEPEND", "repository",
961 + "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository",
962 "RESTRICT", "SLOT"])
963
964 # Repoman modifies _aux_cache_keys, so delay _aux_cache_slot_dict
965
966 Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
967 ===================================================================
968 --- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-09-27 16:08:34 UTC (rev 11571)
969 +++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-09-27 16:14:37 UTC (rev 11572)
970 @@ -1072,7 +1072,7 @@
971 self._aux_cache_keys = set(
972 ["CHOST", "COUNTER", "DEPEND", "DESCRIPTION",
973 "EAPI", "HOMEPAGE", "IUSE", "KEYWORDS",
974 - "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
975 + "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND",
976 "repository", "RESTRICT" , "SLOT", "USE"])
977 self._aux_cache_obj = None
978 self._aux_cache_filename = os.path.join(self.root,
979
980 Modified: main/branches/prefix/pym/portage/output.py
981 ===================================================================
982 --- main/branches/prefix/pym/portage/output.py 2008-09-27 16:08:34 UTC (rev 11571)
983 +++ main/branches/prefix/pym/portage/output.py 2008-09-27 16:14:37 UTC (rev 11572)
984 @@ -503,7 +503,7 @@
985 @param msg: A very brief (shorter than one line) error message.
986 @type msg: StringType
987 """
988 - out = sys.stdout
989 + out = sys.stderr
990 if not self.quiet:
991 if self.__last_e_cmd == "ebegin":
992 out.write("\n")
993 @@ -548,7 +548,7 @@
994 @param msg: A very brief (shorter than one line) warning message.
995 @type msg: StringType
996 """
997 - out = sys.stdout
998 + out = sys.stderr
999 if not self.quiet:
1000 if self.__last_e_cmd == "ebegin":
1001 out.write("\n")