Merged from trunk -r11544:11564
authorFabian Groffen <grobian@gentoo.org>
Sat, 27 Sep 2008 16:14:37 +0000 (16:14 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 27 Sep 2008 16:14:37 +0000 (16:14 -0000)
   | 11545   | Use echo -e when splitting lines in e* functions, for        |
   | zmedico | compatibility with previous behavior wrt \e escape codes     |
   |         | such as `elog "\e[31m***\e[0m"` for example. Thanks to       |
   |         | Arfrever for finding this solution.                          |

   | 11546   | Fix message: s/One or packages/One or more packages/. Thanks |
   | zmedico | to Marijn Schouten <hkBst@g.o> for reporting.                |

   | 11547   | Ensure that cache modules always return a dict containing    |
   | zmedico | the _eclasses_ key.                                          |

   | 11548   | Fix mirror_cache() so it won't silently swallow a KeyError   |
   | zmedico | if _mtime_ or _eclass_ happens to be missing from the cache  |
   |         | data for some reason.                                        |

   | 11549   | Add PROPERTIES to portage.auxdbkeys since it's been approved |
   | zmedico | by the council.                                              |

   | 11550   | Bump to EAPI 2.                                              |
   | zmedico |                                                              |

   | 11551   | Rename the EAPI 2 docs and to indicate that they are no      |
   | zmedico | longer a draft, and remove the EAPI 2_pre* docs.             |

   | 11552   | Make flat_hash write keys in alphabetical order.             |
   | zmedico |                                                              |

   | 11553   | Fix a potential IndexError inside display_preserved_libs().  |
   | zmedico |                                                              |

   | 11554   | Direct EOutput.eerror() and ewarn() output to stderr.        |
   | zmedico |                                                              |

   | 11555   | Handle possible CacheError inside mirror_cache().            |
   | zmedico |                                                              |

   | 11556   | Add back code removed in r11553 and fix logic to avoid       |
   | zmedico | IndexError.                                                  |

   | 11558   | Bug #238766 - Revert the fetch() mirror:// behavior change   |
   | zmedico | from r11537 since it wasn't actually needed to comply with   |
   |         | PMS 9.2.8, and the change actuall caused incorrect mirror    |
   |         | fetching behavior.                                           |

   | 11560   | Update hardcoded auxdbkey_order attributes to include        |
   | zmedico | PROPERTIES.                                                  |

   | 11561   | Add PROPERTIES to all of the metadata caches.                |
   | zmedico |                                                              |

   | 11562   | Add PROPERTIES to the list of USE evaluated keys for the     |
   | zmedico | Packages index.                                              |

   | 11563   | Make $PWD default to $PORTAGE_BUILDDIR since $WORKDIR is     |
   | zmedico | sometimes created later.                                     |

   | 11564   | In the --depclean docs, there's no need to advise the user   |
   | zmedico | to use --oneshot when updating @system @world since @system  |
   |         | now has world-candidate set to False by default.             |

svn path=/main/branches/prefix/; revision=11572

20 files changed:
bin/ebuild.sh
bin/isolated-functions.sh
bin/repoman
doc/package/ebuild/eapi/2.docbook
man/emerge.1
pym/_emerge/__init__.py
pym/_emerge/help.py
pym/portage/__init__.py
pym/portage/cache/flat_hash.py
pym/portage/cache/flat_list.py
pym/portage/cache/metadata.py
pym/portage/cache/sql_template.py
pym/portage/cache/sqlite.py
pym/portage/cache/template.py
pym/portage/cache/util.py
pym/portage/const.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py
pym/portage/output.py

index c40e9fc5d9775bfa8e92ef45cf145fe9dd8f7f90..27f579d010dffa51ac86d1f180e90369f275c07e 100755 (executable)
@@ -272,8 +272,8 @@ register_die_hook() {
        export EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} $*"
 }
 
-# Ensure that $CWD is sane whenever possible.
-cd "$WORKDIR" 2>/dev/null
+# Ensure that $PWD is sane whenever possible.
+cd "$PORTAGE_BUILDDIR" 2>/dev/null
 
 #if no perms are specified, dirs/files will have decent defaults
 #(not secretive, but not stupid)
@@ -1031,7 +1031,7 @@ dyn_install() {
        for f in ASFLAGS CATEGORY CBUILD CC CFLAGS CHOST CTARGET CXX \
                CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \
                FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS \
-               LICENSE PDEPEND PF PKGUSE PROVIDE RDEPEND RESTRICT SLOT \
+               LICENSE PDEPEND PF PKGUSE PROPERTIES PROVIDE RDEPEND RESTRICT SLOT \
                KEYWORDS HOMEPAGE SRC_URI DESCRIPTION; do
                [ -n "${!f}" ] && echo $(echo "${!f}" | \
                        tr '\n,\r,\t' ' , , ' | sed s/'  \+'/' '/g) > ${f}
@@ -2071,8 +2071,8 @@ ebuild_main() {
 
                auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
                        DESCRIPTION KEYWORDS INHERITED IUSE CDEPEND PDEPEND PROVIDE EAPI
-                       UNUSED_01 UNUSED_02 UNUSED_03 UNUSED_04 UNUSED_05 UNUSED_06
-                       UNUSED_07"
+                       PROPERTIES UNUSED_06 UNUSED_05 UNUSED_04
+                       UNUSED_03 UNUSED_02 UNUSED_01"
 
                #the extra $(echo) commands remove newlines
                unset CDEPEND
index 317e4360f30c1b174349c0a02e05dcb85796abac..b222d5a4b5a4587ddbc4355aadc767a9dc814302 100755 (executable)
@@ -181,7 +181,7 @@ elog_base() {
        # not entirely safe to use it as a delimiter in the log file since
        # there can still be escaped newlines that will be expanded due to
        # the echo -e parameter.
-       echo "$@" | while read line ; do
+       echo -e "$@" | while read line ; do
                echo -ne "${messagetype} ${line}\n\0" >> \
                        "${T}/logging/${EBUILD_PHASE:-other}"
        done
@@ -191,7 +191,7 @@ elog_base() {
 eqawarn() {
        elog_base QA "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo "$@" | while read line ; do
+       echo -e "$@" | while read line ; do
                vecho -e " ${WARN}*${NORMAL} ${line}" >&2
        done
        LAST_E_CMD="eqawarn"
@@ -201,7 +201,7 @@ eqawarn() {
 elog() {
        elog_base LOG "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo "$@" | while read line ; do
+       echo -e "$@" | while read line ; do
                echo -e " ${GOOD}*${NORMAL} ${line}"
        done
        LAST_E_CMD="elog"
@@ -231,7 +231,7 @@ esyslog() {
 einfo() {
        elog_base INFO "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo "$@" | while read line ; do
+       echo -e "$@" | while read line ; do
                echo -e " ${GOOD}*${NORMAL} ${line}"
        done
        LAST_E_CMD="einfo"
@@ -249,7 +249,7 @@ einfon() {
 ewarn() {
        elog_base WARN "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo "$@" | while read line ; do
+       echo -e "$@" | while read line ; do
                echo -e " ${WARN}*${NORMAL} ${RC_INDENTATION}${line}" >&2
        done
        LAST_E_CMD="ewarn"
@@ -259,7 +259,7 @@ ewarn() {
 eerror() {
        elog_base ERROR "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo "$@" | while read line ; do
+       echo -e "$@" | while read line ; do
                echo -e " ${BAD}*${NORMAL} ${RC_INDENTATION}${line}" >&2
        done
        LAST_E_CMD="eerror"
index 6c7b803749b978a9b63cc8e3c8ad26b615c572f4..a567a2455cd6cd7e75d10f9a6caeb961ca5334a5 100755 (executable)
@@ -533,9 +533,8 @@ setconfig = load_default_config(repoman_settings, trees["/"])
 root_config = RootConfig(repoman_settings, trees["/"], setconfig)
 # We really only need to cache the metadata that's necessary for visibility
 # filtering. Anything else can be discarded to reduce memory consumption.
-for k in ("DEPEND", "LICENCE", "PDEPEND",
-       "PROVIDE", "RDEPEND", "RESTRICT", "repository"):
-       portdb._aux_cache_keys.discard(k)
+portdb._aux_cache_keys.clear()
+portdb._aux_cache_keys.update(["EAPI", "KEYWORDS", "SLOT"])
 # dep_zapdeps looks at the vardbapi, but it shouldn't for repoman.
 del trees["/"]["vartree"]
 
index ef1038b4034f79481dfc60397c5906d79b1ed889..849d29857ab279a03f8dd78074a118c04676c211 100644 (file)
-<section id='package-ebuild-eapi-2_pre1'>
-       <title>EAPI 2_pre1</title>
+<section id='package-ebuild-eapi-2'>
+       <title>EAPI 2</title>
        <section id='package-ebuild-eapi-2-helpers'>
        <title>Helpers</title>
        <section id='package-ebuild-eapi-2-helpers-doman'>
        <title>doman</title>
-       <para>
-       Language codes in file names are now used for path translation.
-       </para>
-       <table><title>Man Page Path Translation</title>
-       <tgroup cols='2' align='left' >
-       <colspec colname='source'/>
-       <colspec colname='destination'/>
-       <thead>
-       <row>
-       <entry>Source</entry>
-       <entry>Destination</entry>
-       </row>
-       </thead>
-       <tbody>
-       <row>
-       <entry>foo.1</entry>
-       <entry>/usr/share/man/man1/foo.1</entry>
-       </row>
-       <row>
-       <entry>foo.lang.1</entry>
-       <entry>/usr/share/man/lang/man1/foo.1</entry>
-       </row>
-       </tbody>
-       </tgroup>
-       </table>
-       </section>
-       </section>
-       <section id='package-ebuild-eapi-2-use-deps'>
-       <title>USE Dependencies</title>
-       <section id='package-ebuild-eapi-2-use-deps-unconditional'>
-       <title>Unconditional USE Dependencies</title>
-       <table><title>Syntax Examples</title>
-       <tgroup cols='2' align='left' >
-       <colspec colname='example'/>
-       <colspec colname='meaning'/>
-       <thead>
-       <row>
-       <entry>Example</entry>
-       <entry>Meaning</entry>
-       </row>
-       </thead>
-       <tbody>
-       <row>
-       <entry>foo[bar]</entry>
-       <entry>foo must have bar enabled</entry>
-       </row>
-       <row>
-       <entry>foo[bar,baz]</entry>
-       <entry>foo must have both bar and baz enabled</entry>
-       </row>
-       <row>
-       <entry>foo[-bar,baz]</entry>
-       <entry>foo must have bar disabled and baz enabled</entry>
-       </row>
-       </tbody>
-       </tgroup>
-       </table>
-       </section>
-       <section id='package-ebuild-eapi-2-use-deps-conditional'>
-       <title>Conditional USE Dependencies</title>
-       <table><title>Syntax Examples</title>
-       <tgroup cols='2' align='left' >
-       <colspec colname='compact'/>
-       <colspec colname='expanded'/>
-       <thead>
-       <row>
-       <entry>Compact Form</entry>
-       <entry>Equivalent Expanded Form</entry>
-       </row>
-       </thead>
-       <tbody>
-       <row>
-       <entry>foo[bar?]</entry>
-       <entry>bar? ( foo[bar]  ) !bar? ( foo       )</entry>
-       </row>
-       <row>
-       <entry>foo[!bar?]</entry>
-       <entry>bar? ( foo       ) !bar? ( foo[-bar] )</entry>
-       </row>
-       <row>
-       <entry>foo[bar=]</entry>
-       <entry>bar? ( foo[bar]  ) !bar? ( foo[-bar] )</entry>
-       </row>
-       <row>
-       <entry>foo[!bar=]</entry>
-       <entry>bar? ( foo[-bar] ) !bar? ( foo[bar]  )</entry>
-       </row>
-       </tbody>
-       </tgroup>
-       </table>
-       </section>
-       </section>
-</section>
-<section id='package-ebuild-eapi-2_pre2'>
-       <title>EAPI 2_pre2</title>
-       <section id='package-ebuild-eapi-2-phases'>
-               <title>Phases</title>
-               <section id='package-ebuild-eapi-2-phases-src-configure'>
-                       <title>New src_configure Phase Function</title>
-                       <para>
-                       The configure portion of the src_compile function has been
-                       split into a separate function which is named src_configure. The
-                       src_configure function is called in-between the src_unpack and
-                       src_compile functions.
-                       </para>
-                       <programlisting>
-src_configure() {
-       if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
-               econf
-       fi
-}
-
-src_compile() {
-       if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ] ; then
-               emake || die "emake failed"
-       fi
-}
-                       </programlisting>
-                       <table><title>Execution Order of Phase Functions</title>
-                               <tgroup cols='1' align='left' >
-                               <colspec colname='name'/>
-                               <thead>
-                               <row>
-                                       <entry>Phase Function Name</entry>
-                               </row>
-                               </thead>
-                               <tbody>
-                               <row>
-                                       <entry>pkg_setup</entry>
-                               </row>
-                               <row>
-                                       <entry>src_unpack</entry>
-                               </row>
-                               <row>
-                                       <entry>src_configure</entry>
-                               </row>
-                               <row>
-                                       <entry>src_compile</entry>
-                               </row>
-                               <row>
-                                       <entry>src_test</entry>
-                               </row>
-                               <row>
-                                       <entry>src_install</entry>
-                               </row>
-                               <row>
-                                       <entry>pkg_preinst</entry>
-                               </row>
-                               <row>
-                                       <entry>pkg_postinst</entry>
-                               </row>
-                               <row>
-                                       <entry>pkg_prerm</entry>
-                               </row>
-                               <row>
-                                       <entry>pkg_postrm</entry>
-                               </row>
-                               </tbody>
-                               </tgroup>
-                       </table>
-               </section>
-               <section id='package-ebuild-eapi-2-phases-default-functions'>
-                       <title>Default Phase Functions</title>
-                       <para>
-                       The default pkg_nofetch and src_* phase functions are now
-                       accessible via a function having a name
-                       that begins with default_ and
-                       ends with the respective phase function name. For example,
-                       a call to a function with the name default_src_compile is
-                       equivalent to a call to the default src_compile
-                       implementation.
-                       </para>
-                       <table><title>Default Phase Functions</title>
-                               <tgroup cols='1' align='left' >
-                               <colspec colname='name'/>
-                               <thead>
-                               <row>
-                                       <entry>Function Name</entry>
-                               </row>
-                               </thead>
-                               <tbody>
-                               <row>
-                                       <entry>default_pkg_nofetch</entry>
-                               </row>
-                               <row>
-                                       <entry>default_src_unpack</entry>
-                               </row>
-                               <row>
-                                       <entry>default_src_configure</entry>
-                               </row>
-                               <row>
-                                       <entry>default_src_compile</entry>
-                               </row>
-                               <row>
-                                       <entry>default_src_test</entry>
-                               </row>
-                               </tbody>
-                               </tgroup>
-                       </table>
-               </section>
-               <section id='package-ebuild-eapi-2-phases-default-function-alias'>
-                       <title>Default Phase Function Alias</title>
-                       <para>
-                       A function named "default" is redefined for each phase so that it
-                       will call the default_* function corresponding to the current phase.
-                       For example, a call to the function named "default" during the
-                       src_compile phase is equivalent to a call to the function named
-                       default_src_compile.
-                       </para>
-               </section>
-       </section>
-</section>
-<section id='package-ebuild-eapi-2-pre3'>
-       <title>EAPI 2_pre3</title>
-       <section id='package-ebuild-eapi-2-pre3-metadata'>
-       <title>Metadata</title>
-       <section id='package-ebuild-eapi-2-pre3-metadata-dependencies'>
-       <title>Dependencies</title>
-       <section id='package-ebuild-eapi-2-pre3-metadata-dependencies-blocker-atoms'>
-       <title>Blocker Atoms</title>
-       <section id='package-ebuild-eapi-2-pre3-metadata-dependencies-blocker-atoms-new-meaning'>
-       <title>New Meaning for Old Syntax</title>
-       <para>
-       Blocker atoms which use the previously existing !atom syntax now have
-       a slightly different meaning. These blocker atoms indicate that
-       conflicting packages may be temporarily installed simultaneously. When
-       temporary simultaneous installation of conflicting packages occurs, the
-       installation of a newer package may overwrite any colliding files that
-       belong to an older package which is explicitly blocked. When such file
-       collisions occur, the colliding files cease to belong to the older
-       package, and they remain installed after the older package is
-       eventually uninstalled. The older package is uninstalled only after
-       any newer blocking packages have been merged on top of it.
-       </para>
-       </section>
-       <section id='package-ebuild-eapi-2-pre3-metadata-dependencies-blocker-atoms-new-syntax'>
-       <title>New !!atom Syntax</title>
-       <para>
-       A new !!atom syntax is now supported, for use in special cases for which
-       temporary simultaneous installation of conflicting packages should not be
-       allowed. If a given package happens to be blocked my a mixture of atoms
-       consisting of both the !atom and !!atom syntaxes, the !!atom syntax takes
-       precedence over the !atom syntax.
-       </para>
-       </section>
-       </section>
-       </section>
-       <section id='package-ebuild-eapi-2-pre3-metadata-src-uri'>
-               <title>SRC_URI</title>
-               <section id='package-ebuild-eapi-2-pre3-metadata-src-uri-output-file-name-customization'>
-                       <title>Customization of Output File Names</title>
-                       <para>
-                       A new syntax is supported which allows customization of the output
-                       file name for a given URI. In order to customize the output file
-                       name, a given URI should be followed by a "->" operator which,
-                       in turn, should be followed by the desired output file name. As
-                       usual, all tokens, including the operator and output file name,
-                       should be separated by whitespace.
-                       </para>
-               </section>
-       </section>
-       </section>
-       <section id='package-ebuild-eapi-2-pre3-phases'>
-               <title>Phases</title>
-               <section id='package-ebuild-eapi-2-pre3-phases-src-prepare'>
-                       <title>New src_prepare Phase Function</title>
-                       <para>
-                       A new src_prepare function is called after the src_unpack
-                       function, with cwd initially set to $S.
-                       </para>
-               </section>
-       </section>
-</section>
-<section id='package-ebuild-eapi-2-draft'>
-       <title>EAPI 2 Draft</title>
-       <section id='package-ebuild-eapi-2-draft-helpers'>
-       <title>Helpers</title>
-       <section id='package-ebuild-eapi-2-draft-helpers-doman'>
-       <title>doman</title>
-       <section id='package-ebuild-eapi-2-draft-helpers-doman-language-codes'>
+       <section id='package-ebuild-eapi-2-helpers-doman-language-codes'>
        <title>Recognition of Language Codes in File Names</title>
        <para>
        Language codes in file names are now used for path translation.
@@ -313,13 +34,13 @@ src_compile() {
        </section>
        </section>
        </section>
-       <section id='package-ebuild-eapi-2-draft-metadata'>
+       <section id='package-ebuild-eapi-2-metadata'>
        <title>Metadata</title>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies'>
        <title>Dependencies</title>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies-blocker-atoms'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies-blocker-atoms'>
        <title>Blocker Atoms</title>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies-blocker-atoms-new-meaning'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies-blocker-atoms-new-meaning'>
        <title>New Meaning for Old Syntax</title>
        <para>
        Blocker atoms which use the previously existing !atom syntax now have
@@ -334,7 +55,7 @@ src_compile() {
        any newer blocking packages have been merged on top of it.
        </para>
        </section>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies-blocker-atoms-new-syntax'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies-blocker-atoms-new-syntax'>
        <title>New !!atom Syntax</title>
        <para>
        A new !!atom syntax is now supported, for use in special cases for which
@@ -345,9 +66,9 @@ src_compile() {
        </para>
        </section>
        </section>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies-use'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies-use'>
        <title>USE Dependencies</title>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies-use-unconditional'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies-use-unconditional'>
        <title>Unconditional USE Dependencies</title>
        <table><title>Syntax Examples</title>
        <tgroup cols='2' align='left' >
@@ -376,7 +97,7 @@ src_compile() {
        </tgroup>
        </table>
        </section>
-       <section id='package-ebuild-eapi-2-draft-metadata-dependencies-use-conditional'>
+       <section id='package-ebuild-eapi-2-metadata-dependencies-use-conditional'>
        <title>Conditional USE Dependencies</title>
        <table><title>Syntax Examples</title>
        <tgroup cols='2' align='left' >
@@ -411,9 +132,9 @@ src_compile() {
        </section>
        </section>
        </section>
-       <section id='package-ebuild-eapi-2-draft-metadata-src-uri'>
+       <section id='package-ebuild-eapi-2-metadata-src-uri'>
                <title>SRC_URI</title>
-               <section id='package-ebuild-eapi-2-draft-metadata-src-uri-output-file-name-customization'>
+               <section id='package-ebuild-eapi-2-metadata-src-uri-output-file-name-customization'>
                        <title>Customization of Output File Names</title>
                        <para>
                        A new syntax is supported which allows customization of the output
@@ -426,16 +147,16 @@ src_compile() {
                </section>
        </section>
        </section>
-       <section id='package-ebuild-eapi-2-draft-phases'>
+       <section id='package-ebuild-eapi-2-phases'>
                <title>Phases</title>
-               <section id='package-ebuild-eapi-2-draft-phases-src-prepare'>
+               <section id='package-ebuild-eapi-2-phases-src-prepare'>
                        <title>New src_prepare Phase Function</title>
                        <para>
                        A new src_prepare function is called after the src_unpack
                        function, with cwd initially set to $S.
                        </para>
                </section>
-               <section id='package-ebuild-eapi-2-draft-phases-src-configure'>
+               <section id='package-ebuild-eapi-2-phases-src-configure'>
                        <title>New src_configure Phase Function</title>
                        <para>
                        The configure portion of the src_compile function has been
@@ -457,7 +178,7 @@ src_compile() {
 }
                        </programlisting>
                </section>
-               <section id='package-ebuild-eapi-2-draft-phases-order'>
+               <section id='package-ebuild-eapi-2-phases-order'>
                        <title>Execution Order of Phase Functions</title>
                        <table><title>Execution Order of Phase Functions</title>
                                <tgroup cols='1' align='left' >
@@ -505,7 +226,7 @@ src_compile() {
                                </tgroup>
                        </table>
                </section>
-               <section id='package-ebuild-eapi-2-draft-phases-default-functions'>
+               <section id='package-ebuild-eapi-2-phases-default-functions'>
                        <title>Default Phase Functions</title>
                        <para>
                        The default pkg_nofetch and src_* phase functions are now
@@ -547,7 +268,7 @@ src_compile() {
                                </tgroup>
                        </table>
                </section>
-               <section id='package-ebuild-eapi-2-draft-phases-default-function-alias'>
+               <section id='package-ebuild-eapi-2-phases-default-function-alias'>
                        <title>Default Phase Function Alias</title>
                        <para>
                        A function named "default" is redefined for each phase so that it
index a14cc615c495fe113133f2ad0c3ca5f2f100e37e..3da39a620f59580dcd19b926221a1c7e87c9306c 100644 (file)
@@ -114,7 +114,7 @@ always be kept. They can be manually added to this set with \fIemerge
 \-\-noreplace <atom>\fR. As a safety measure, depclean will not remove any
 packages unless *all* required dependencies have been resolved. As a
 consequence, it is often necessary to run \fIemerge \-\-update \-\-newuse
-\-\-deep \-\-oneshot @system @world\fR prior to depclean. 
+\-\-deep @system @world\fR prior to depclean. 
 
 \fBWARNING:\fR
 Inexperienced users are advised to use \fB\-\-pretend\fR with this
index 081bd7e2aa0f4b8057f7c34a7d0928aa8ae07be1..947954967647b1d156a45056677cd76c5889aaa2 100644 (file)
@@ -1439,7 +1439,7 @@ class Package(Task):
                "CHOST", "COUNTER", "DEPEND", "EAPI",
                "INHERITED", "IUSE", "KEYWORDS",
                "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
-               "repository", "RESTRICT", "SLOT", "USE", "_mtime_", "EPREFIX" ]
+               "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE", "_mtime_", "EPREFIX" ]
 
        def __init__(self, **kwargs):
                Task.__init__(self, **kwargs)
@@ -10086,7 +10086,7 @@ class Scheduler(PollScheduler):
                if e is not None:
                        mydepgraph.display_problems()
                        out = portage.output.EOutput()
-                       out.eerror("One or packages are either masked or " + \
+                       out.eerror("One or more packages are either masked or " + \
                                "have missing dependencies:")
                        out.eerror("")
                        indent = "  "
@@ -10935,10 +10935,12 @@ def display_preserved_libs(vardbapi):
                                owners = vardbapi._owners.getFileOwnerMap(consumers[:MAX_DISPLAY+2])
                                for c in consumers[:MAX_DISPLAY]:
                                        print colorize("WARN", " * ") + "     used by %s (%s)" % (c, ", ".join([x.mycpv for x in owners[c]]))
-                               if len(consumers) > MAX_DISPLAY + 1:
+                               if len(consumers) == MAX_DISPLAY + 1:
+                                       print colorize("WARN", " * ") + "     used by %s (%s)" % \
+                                               (consumers[MAX_DISPLAY], ", ".join(
+                                               x.mycpv for x in owners[consumers[MAX_DISPLAY]]))
+                               elif len(consumers) > MAX_DISPLAY:
                                        print colorize("WARN", " * ") + "     used by %d other files" % (len(consumers) - MAX_DISPLAY)
-                               else:
-                                       print colorize("WARN", " * ") + "     used by %s (%s)" % (consumers[MAX_DISPLAY], ", ".join([x.mycpv for x in owners[consumers[MAX_DISPLAY]]]))
                print "Use " + colorize("GOOD", "emerge @preserved-rebuild") + " to rebuild packages using these libraries"
 
 
@@ -11997,7 +11999,7 @@ def action_depclean(settings, trees, ldpath_mtimes,
        msg.append("unless *all* required dependencies have been resolved.  As a\n")
        msg.append("consequence, it is often necessary to run %s\n" % \
                good("`emerge --update"))
-       msg.append(good("--newuse --deep --oneshot @system @world`") + \
+       msg.append(good("--newuse --deep @system @world`") + \
                " prior to depclean.\n")
 
        if action == "depclean" and "--quiet" not in myopts and not myfiles:
@@ -12805,7 +12807,7 @@ def action_build(settings, trees, mtimedb,
                                out.eerror("")
 
                        if isinstance(e, depgraph.UnsatisfiedResumeDep):
-                               out.eerror("One or packages are either masked or " + \
+                               out.eerror("One or more packages are either masked or " + \
                                        "have missing dependencies:")
                                out.eerror("")
                                indent = "  "
index 5c7b0d6e6f888a5e1c3ddf4be528a694f9e06f62..05a9803c929e8bbfb6c4910332b9a4d3e43ea652 100644 (file)
@@ -79,7 +79,7 @@ def help(myaction,myopts,havecolor=1):
                "emerge --noreplace <atom>. As a safety measure, depclean " + \
                "will not remove any packages unless *all* required dependencies " + \
                "have been resolved. As a consequence, it is often necessary to " + \
-               "run emerge --update --newuse --deep --oneshot @system @world " + \
+               "run emerge --update --newuse --deep @system @world " + \
                "prior to depclean."
 
                for line in wrap(paragraph, desc_width):
index 3a002179b234dfef4e408b26d192ef60d7e4c66c..51a8cb668971a3ea2cde6ff154dc129140dd6774 100644 (file)
@@ -3528,13 +3528,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                        eidx = myuri.find("/", 9)
                        if eidx != -1:
                                mirrorname = myuri[9:eidx]
-                               if myfile != os.path.basename(myuri):
-                                       # If a SRC_URI arrow is used together with
-                                       # mirror://, preserve the remote path that's
-                                       # specified within the uri.
-                                       path = myuri[eidx+1:]
-                               else:
-                                       path = myfile
+                               path = myuri[eidx+1:]
 
                                # Try user-defined mirrors first
                                if mirrorname in custommirrors:
@@ -6891,8 +6885,8 @@ auxdbkeys=[
        'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
        'KEYWORDS',  'INHERITED', 'IUSE',      'CDEPEND',
        'PDEPEND',   'PROVIDE', 'EAPI',
-       'UNUSED_01', 'UNUSED_02', 'UNUSED_03', 'UNUSED_04',
-       'UNUSED_05', 'UNUSED_06', 'UNUSED_07',
+       'PROPERTIES', 'UNUSED_06', 'UNUSED_05', 'UNUSED_04',
+       'UNUSED_03', 'UNUSED_02', 'UNUSED_01',
        ]
 auxdbkeylen=len(auxdbkeys)
 
index ed1eebd123dd978d224dfb8e0dff79e85e9ed1b3..219a4a22dea3644f9ef41d64646e578d7fa869e3 100644 (file)
@@ -16,7 +16,9 @@ class database(fs_template.FsBased):
                super(database,self).__init__(*args, **config)
                self.location = os.path.join(self.location, 
                        self.label.lstrip(os.path.sep).rstrip(os.path.sep))
-
+               write_keys = set(self._known_keys)
+               write_keys.add("_eclasses_")
+               self._write_keys = sorted(write_keys)
                if not self.readonly and not os.path.exists(self.location):
                        self._ensure_dirs()
 
@@ -46,6 +48,8 @@ class database(fs_template.FsBased):
                        raise cache_errors.CacheCorruption(cpv, e)
                if "_eclasses_" in d:
                        d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
+               else:
+                       d["_eclasses_"] = {}
                return d
                
                for x in self._known_keys:
@@ -71,13 +75,14 @@ class database(fs_template.FsBased):
                        else:
                                raise cache_errors.CacheCorruption(cpv, e)
 
-               for k, v in values.iteritems():
-                       if not v:
-                               continue
-                       if k != "_mtime_" and (k == "_eclasses_" or k in self._known_keys):
+               try:
+                       for k in self._write_keys:
+                               v = values.get(k)
+                               if not v:
+                                       continue
                                myf.write("%s=%s\n" % (k, v))
-
-               myf.close()
+               finally:
+                       myf.close()
                self._ensure_access(fp, mtime=values["_mtime_"])
 
                #update written.  now we move it.
index d3e480f96e83bb2d23c9923bacb6a9dcc61aea81..65983393f5e91fa974158fdcb1443b93980f1c01 100644 (file)
@@ -11,7 +11,7 @@ class database(fs_template.FsBased):
        auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
                'RESTRICT',  'HOMEPAGE',  'LICENSE', 'DESCRIPTION',
                'KEYWORDS',  'IUSE', 'CDEPEND',
-               'PDEPEND',   'PROVIDE','_eclasses_')
+               'PDEPEND',   'PROVIDE', 'EAPI', 'PROPERTIES')
 
        def __init__(self, label, auxdbkeys, **config):
                super(database,self).__init__(label, auxdbkeys, **config)
index c32cffe57169d730796e6218c135fe69ffd02bbd..521d71ac19266eb5c54bfa7a3f2a4709eee4a75d 100644 (file)
@@ -18,7 +18,7 @@ class database(flat_hash.database):
        auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
                'RESTRICT',  'HOMEPAGE',  'LICENSE', 'DESCRIPTION',
                'KEYWORDS',  'INHERITED', 'IUSE', 'CDEPEND',
-               'PDEPEND',   'PROVIDE', 'EAPI')
+               'PDEPEND',   'PROVIDE', 'EAPI', 'PROPERTIES')
 
        autocommits = True
 
@@ -66,6 +66,8 @@ class database(flat_hash.database):
                        if "INHERITED" in d:
                                d["_eclasses_"] = self.ec.get_eclass_data(d["INHERITED"].split(), from_master_only=True)
                                del d["INHERITED"]
+                       else:
+                               d["_eclasses_"] = {}
                elif isinstance(d["_eclasses_"], basestring):
                        # We skip this if flat_hash.database._parse_data() was called above
                        # because it calls reconstruct_eclasses() internally.
index 196039c74950cd24ca7675bff20b05aa6f7da8c6..fe873c3eab4dad2def53b3d6a4cae2b6157e2a94 100644 (file)
@@ -238,6 +238,8 @@ class SQLDatabase(template.database):
                                        d = dict(l)
                                        if "_eclasses_" in d:
                                                d["_eclasses_"] = reconstruct_eclasses(oldcpv, d["_eclasses_"])
+                                       else:
+                                               d["_eclasses_"] = {}
                                        yield cpv, d
                                l.clear()
                                oldcpv = x
@@ -246,6 +248,8 @@ class SQLDatabase(template.database):
                        d = dict(l)
                        if "_eclasses_" in d:
                                d["_eclasses_"] = reconstruct_eclasses(oldcpv, d["_eclasses_"])
+                       else:
+                               d["_eclasses_"] = {}
                        yield cpv, d                    
 
        def commit(self):
index dae9d4c1d902b16d933030c5c506007cf754c519..a53e8172ad415b6f6c59f62e74136bf2b697bfc4 100644 (file)
@@ -170,6 +170,8 @@ class database(fs_template.FsBased):
                                pass #writemsg("%s: %s\n" % (cpv, str(e)))
                if "_eclasses_" in d:
                        d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
+               else:
+                       d["_eclasses_"] = {}
                for x in self._known_keys:
                        d.setdefault(x,'')
                return d
index 891a5821f715df8e7906b2a746d628982f876c1e..3cf8309dd4a75d16ed9d439c31a5e99f6b7d8ad7 100644 (file)
@@ -37,6 +37,8 @@ class database(object):
                d=self._getitem(cpv)
                if self.serialize_eclasses and "_eclasses_" in d:
                        d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
+               elif "_eclasses_" not in d:
+                       d["_eclasses_"] = {}
                return d
 
        def _getitem(self, cpv):
index f256be76ffa3ab6998e14228f8e55b08ad0ca4f9..dafaed09452bbfa42f10eb1e0581286be3b45876 100644 (file)
@@ -39,12 +39,16 @@ def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None,
                trg = None
                try:
                        trg = trg_cache[x]
-                       if long(trg["_mtime_"]) == long(entry["_mtime_"]) and \
-                               eclass_cache.is_eclass_data_valid(trg["_eclasses_"]) and \
-                               set(trg["_eclasses_"]) == set(entry["_eclasses_"]):
-                               write_it = False
-               except (cache_errors.CacheError, KeyError):
+               except (KeyError, cache_errors.CacheError):
                        pass
+               else:
+                       try:
+                               if long(trg["_mtime_"]) == long(entry["_mtime_"]) and \
+                                       eclass_cache.is_eclass_data_valid(trg["_eclasses_"]) and \
+                                       set(trg["_eclasses_"]) == set(entry["_eclasses_"]):
+                                       write_it = False
+                       except cache_errors.CacheError:
+                               pass
 
                if trg and not write_it:
                        """ We don't want to skip the write unless we're really sure that
index d04ab0f4ef12729f84f62619d9d21421af7a4072..dcc23e7927135b14aaecd082f565eaa53e22a7c0 100644 (file)
@@ -84,7 +84,7 @@ EBUILD_PHASES           = ["setup", "unpack", "prepare", "configure",
                           "package", "preinst", "postinst","prerm", "postrm",
                           "nofetch", "config", "info", "other"]
 
-EAPI = 1
+EAPI = 2
 
 HASHING_BLOCKSIZE        = 32768
 MANIFEST1_HASH_FUNCTIONS = ["MD5","SHA256","RMD160"]
index f926f9441ec4366a657b088c444817fa09d2e5c6..a9121ed795c184867d559ab8847b6f6d634224a3 100644 (file)
@@ -33,7 +33,7 @@ class bindbapi(fakedbapi):
                # Selectively cache metadata in order to optimize dep matching.
                self._aux_cache_keys = set(
                        ["CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS",
-                       "LICENSE", "PDEPEND", "PROVIDE",
+                       "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE",
                        "RDEPEND", "repository", "RESTRICT", "SLOT", "USE",
                        "EPREFIX"])
                self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys)
@@ -156,10 +156,13 @@ class binarytree(object):
                        self._pkgindex_keys.update(["CPV", "MTIME", "SIZE"])
                        self._pkgindex_aux_keys = \
                                ["CHOST", "DEPEND", "DESCRIPTION", "EAPI",
-                               "IUSE", "KEYWORDS", "LICENSE", "PDEPEND",
+                               "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES",
                                "PROVIDE", "RDEPEND", "repository", "SLOT", "USE",
                                "EPREFIX"]
                        self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
+                       self._pkgindex_use_evaluated_keys = \
+                               ("LICENSE", "RDEPEND", "DEPEND",
+                               "PDEPEND", "PROPERTIES", "PROVIDE")
                        self._pkgindex_header_keys = set(["ACCEPT_KEYWORDS", "CBUILD",
                                "CHOST", "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES",
                                "GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE", "EAPI", "EPREFIX"])
@@ -175,6 +178,7 @@ class binarytree(object):
                                "LICENSE" : "",
                                "PATH"    : "",
                                "PDEPEND" : "",
+                               "PROPERTIES" : "",
                                "PROVIDE" : "",
                                "RDEPEND" : "",
                                "RESTRICT": "",
@@ -913,7 +917,7 @@ class binarytree(object):
                metadata["USE"] = " ".join(use)
                from portage.dep import paren_reduce, use_reduce, \
                        paren_normalize, paren_enclose
-               for k in "LICENSE", "RDEPEND", "DEPEND", "PDEPEND", "PROVIDE":
+               for k in self._pkgindex_use_evaluated_keys:
                        try:
                                deps = paren_reduce(metadata[k])
                                deps = use_reduce(deps, uselist=raw_use)
index 33c8b52f293f96296c044bec55e3eb2390f0890d..8d37007416e138dac8031e50c59fd097b5194ee9 100644 (file)
@@ -172,6 +172,7 @@ class portdbapi(dbapi):
                # XXX: REMOVE THIS ONCE UNUSED_0 IS YANKED FROM auxdbkeys
                # ~harring
                filtered_auxdbkeys = filter(lambda x: not x.startswith("UNUSED_0"), auxdbkeys)
+               filtered_auxdbkeys.sort()
                if secpass < 1:
                        from portage.cache import metadata_overlay, volatile
                        for x in self.porttrees:
@@ -194,7 +195,7 @@ class portdbapi(dbapi):
                # Selectively cache metadata in order to optimize dep matching.
                self._aux_cache_keys = set(
                        ["DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS", "LICENSE",
-                       "PDEPEND", "PROVIDE", "RDEPEND", "repository",
+                       "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository",
                        "RESTRICT", "SLOT"])
 
                # Repoman modifies _aux_cache_keys, so delay _aux_cache_slot_dict
index 18a22bab718cb0af7e54daff68ac83e844a8035b..3cade30f9e9f17c8fc034c7e63a9832939acfff6 100644 (file)
@@ -1072,7 +1072,7 @@ class vardbapi(dbapi):
                self._aux_cache_keys = set(
                        ["CHOST", "COUNTER", "DEPEND", "DESCRIPTION",
                        "EAPI", "HOMEPAGE", "IUSE", "KEYWORDS",
-                       "LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
+                       "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND",
                        "repository", "RESTRICT" , "SLOT", "USE"])
                self._aux_cache_obj = None
                self._aux_cache_filename = os.path.join(self.root,
index 72ef34a250b8680867e7ec3d119ba79f6756f6e3..d52063e25899fe0b98e8fde1a5b5e7ef38f9aacd 100644 (file)
@@ -503,7 +503,7 @@ class EOutput(object):
                @param msg: A very brief (shorter than one line) error message.
                @type msg: StringType
                """
-               out = sys.stdout
+               out = sys.stderr
                if not self.quiet:
                        if self.__last_e_cmd == "ebegin":
                                out.write("\n")
@@ -548,7 +548,7 @@ class EOutput(object):
                @param msg: A very brief (shorter than one line) warning message.
                @type msg: StringType
                """
-               out = sys.stdout
+               out = sys.stderr
                if not self.quiet:
                        if self.__last_e_cmd == "ebegin":
                                out.write("\n")