From d5b364b96e5516042efe8ba2fe1381801b2e75a1 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 25 Apr 2009 08:37:23 +0000 Subject: [PATCH] Merged from trunk -r13375:13383 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit | 13377 | When in --nodeps mode, make depgraph._serialize_tasks() | | zmedico | preserve the package order given on the command line. Thanks | | | to Markus Duft for reporting. | | 13378 | Clarify language in repos.conf reference to repoman and | | zmedico | egencache. | | 13379 | Exit unsuccessfully when in commit mode and nothing is found | | zmedico | to commit. Thanks to Jeremy Olexa for the | | | suggestion. | | 13380 | Add ${PORTAGE_BIN_PATH}/ebuild-helpers/3 directory to PATH | | zmedico | for EAPI 3. Thanks to Tiziano Müller for | | | this patch. | | 13381 | In ebuild_main(), unset ebuild_helpers_path when finished | | zmedico | with it, since bash exposes local variables to 'children'. | | 13382 | Add new dodoc implementation for EAPI 3. Thanks to to | | zmedico | Tiziano Müller for this patch. | | 13383 | Use ret|=1 instead of ++ret, to avoid possible overflow. | | zmedico | | svn path=/main/branches/prefix/; revision=13393 --- bin/ebuild-helpers/3/dodoc | 50 ++++++++++++++++++++++++++++++++++++++ bin/ebuild.sh | 14 +++++++++++ bin/repoman | 2 +- man/portage.5 | 3 ++- pym/_emerge/__init__.py | 7 ++++++ 5 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 bin/ebuild-helpers/3/dodoc diff --git a/bin/ebuild-helpers/3/dodoc b/bin/ebuild-helpers/3/dodoc new file mode 100644 index 000000000..4e7c934ab --- /dev/null +++ b/bin/ebuild-helpers/3/dodoc @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh + +if [ $# -lt 1 ] ; then + vecho "${0##*/}: at least one argument needed" 1>&2 + exit 1 +fi + +dir="${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" +if [ ! -d "${dir}" ] ; then + install -d "${dir}" +fi + +ret=0 + +DOINSRECUR="n" + +if [[ "$1" == "-r" ]] ; then + DOINSRECUR="y" + shift +fi + +for x in "$@" ; do + + if [ -d "${x}" ] ; then + if [[ ${DOINSRECUR} == "n" ]] ; then + continue + fi + + find "${x}" -mindepth 1 -maxdepth 1 -exec \ + env \ + _E_DOCDESTTREE_="$(basename "${x}")" \ + ${0} -r {} \; + + elif [ -s "${x}" ] ; then + install -m0644 "${x}" "${dir}" + ecompress --queue "${dir}/${x##*/}" + + elif [ ! -e "${x}" ] ; then + echo "!!! ${0##*/}: $x does not exist" 1>&2 + ((ret|=1)) + fi + +done + +exit ${ret} diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 3ac2a7694..a333f0d0c 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1912,6 +1912,20 @@ fi ebuild_main() { local f x + # we may want to make this configurable somewhere else + local ebuild_helpers_path + case ${EAPI} in + 3|3_pre1) + ebuild_helpers_path="${PORTAGE_BIN_PATH}/ebuild-helpers/3:${PORTAGE_BIN_PATH}/ebuild-helpers" + ;; + *) + ebuild_helpers_path="${PORTAGE_BIN_PATH}/ebuild-helpers" + ;; + esac + + export PATH="/usr/local/sbin:/sbin:/usr/sbin:${ebuild_helpers_path}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" + unset ebuild_helpers_path + if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then if hasq distcc $FEATURES ; then diff --git a/bin/repoman b/bin/repoman index 3b084d895..669715ce7 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1900,7 +1900,7 @@ else: print print "(Didn't find any changed files...)" print - sys.exit(0) + sys.exit(1) # Manifests need to be regenerated after all other commits, so don't commit # them now even if they have changed. diff --git a/man/portage.5 b/man/portage.5 index 8121e367c..6f64af6bd 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -551,7 +551,8 @@ x11\-libs/qt \-mysql .BR repos.conf Specifies \fIsite\-specific\fR repository configuration information. Note that configuration settings which are specified here do not apply to tools -such as \fBrepoman\fR(1) and \fBegencache\fR(1) since their operations +such as \fBrepoman\fR(1) and \fBegencache\fR(1), since operations +performed by these tools are inherently \fBnot\fR \fIsite\-specific\fR. \fBWARNING:\fR Use of \fBrepos.conf\fR is generally not recommended since resulting changes in eclass inheritance (especially due to \fBeclass\-overrides\fR) may trigger diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 73245722f..d048d5505 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7065,6 +7065,13 @@ class depgraph(object): writemsg("\n", noiselevel=-1) scheduler_graph = self.digraph.copy() + + if '--nodeps' in self.myopts: + # Preserve the package order given on the command line. + return ([node for node in scheduler_graph \ + if isinstance(node, Package) \ + and node.operation == 'merge'], scheduler_graph) + mygraph=self.digraph.copy() # Prune "nomerge" root nodes if nothing depends on them, since # otherwise they slow down merge order calculation. Don't remove -- 2.26.2