From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id ECBE9138010 for ; Fri, 14 Sep 2012 07:27:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D3B0021C004; Fri, 14 Sep 2012 07:26:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 93C8A21C004 for ; Fri, 14 Sep 2012 07:26:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D30C933D758 for ; Fri, 14 Sep 2012 07:26:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 989F6E5444 for ; Fri, 14 Sep 2012 07:26:33 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1347605744.25a5296f29bc7153fa29e2dfe8de9d08d40d9944.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/bashrc-functions.sh bin/ebuild.sh bin/isolated-functions.sh bin/save-ebuild-env.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 25a5296f29bc7153fa29e2dfe8de9d08d40d9944 X-VCS-Branch: master Date: Fri, 14 Sep 2012 07:26:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5341e9ee-c8a1-47d7-84f4-0b150736d596 X-Archives-Hash: 30949b2147c709b6715373cfd688507e commit: 25a5296f29bc7153fa29e2dfe8de9d08d40d9944 Author: Brian Harring gmail com> AuthorDate: Fri Sep 14 04:40:41 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Sep 14 06:55:44 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=25a5296f drop dead functions Specifically, esyslog, {un,}set_unless_changed, and remove_path_entry. --- bin/bashrc-functions.sh | 55 --------------------------------------------- bin/ebuild.sh | 10 +------ bin/isolated-functions.sh | 18 -------------- bin/save-ebuild-env.sh | 6 ++-- 4 files changed, 5 insertions(+), 84 deletions(-) diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh index 4da5585..9fdf999 100644 --- a/bin/bashrc-functions.sh +++ b/bin/bashrc-functions.sh @@ -33,61 +33,6 @@ strip_duplicate_slashes() { fi } -# this is a function for removing any directory matching a passed in pattern from -# PATH -remove_path_entry() { - save_IFS - IFS=":" - stripped_path="${PATH}" - while [ -n "$1" ]; do - cur_path="" - for p in ${stripped_path}; do - if [ "${p/${1}}" == "${p}" ]; then - cur_path="${cur_path}:${p}" - fi - done - stripped_path="${cur_path#:*}" - shift - done - restore_IFS - PATH="${stripped_path}" -} - -# Set given variables unless these variable have been already set (e.g. during emerge -# invocation) to values different than values set in make.conf. -set_unless_changed() { - if [[ $# -lt 1 ]]; then - die "${FUNCNAME}() requires at least 1 argument: VARIABLE=VALUE" - fi - - local argument value variable - for argument in "$@"; do - if [[ ${argument} != *=* ]]; then - die "${FUNCNAME}(): Argument '${argument}' has incorrect syntax" - fi - variable="${argument%%=*}" - value="${argument#*=}" - if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then - eval "${variable}=\"\${value}\"" - fi - done -} - -# Unset given variables unless these variable have been set (e.g. during emerge -# invocation) to values different than values set in make.conf. -unset_unless_changed() { - if [[ $# -lt 1 ]]; then - die "${FUNCNAME}() requires at least 1 argument: VARIABLE" - fi - - local variable - for variable in "$@"; do - if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then - unset ${variable} - fi - done -} - KV_major() { [[ -z $1 ]] && return 1 diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 51e90d7..5178a37 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -23,8 +23,8 @@ else for x in diropts docompress exeopts get_KV insopts \ keepdir KV_major KV_micro KV_minor KV_to_int \ libopts register_die_hook register_success_hook \ - remove_path_entry set_unless_changed strip_duplicate_slashes \ - unset_unless_changed use_with use_enable ; do + strip_duplicate_slashes \ + use_with use_enable ; do eval "${x}() { if has \"\${EAPI:-0}\" 4-python; then die \"\${FUNCNAME}() calls are not allowed in global scope\" @@ -136,12 +136,6 @@ fi # the sandbox is disabled by default except when overridden in the relevant stages export SANDBOX_ON=0 -esyslog() { - # Custom version of esyslog() to take care of the "Red Star" bug. - # MUST follow functions.sh to override the "" parameter problem. - return 0 -} - # Ensure that $PWD is sane whenever possible, to protect against # exploitation of insecure search path for python -c in ebuilds. # See bug #239560. diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 37e5f2d..154506e 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -294,24 +294,6 @@ elog() { return 0 } -esyslog() { - local pri= - local tag= - - if [ -x /usr/bin/logger ] - then - pri="$1" - tag="$2" - - shift 2 - [ -z "$*" ] && return 0 - - /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*" - fi - - return 0 -} - einfo() { elog_base INFO "$*" [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 37438a5..6b38e5d 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -49,7 +49,7 @@ save_ebuild_env() { unset -f assert assert_sigpipe_ok \ dump_trace die \ quiet_mode vecho elog_base eqawarn elog \ - esyslog einfo einfon ewarn eerror ebegin _eend eend KV_major \ + einfo einfon ewarn eerror ebegin _eend eend KV_major \ KV_minor KV_micro KV_to_int get_KV unset_colors set_colors has \ has_phase_defined_up_to \ hasv hasq qa_source qa_call \ @@ -64,9 +64,9 @@ save_ebuild_env() { dyn_compile dyn_test dyn_install \ dyn_preinst dyn_pretend dyn_help debug-print debug-print-function \ debug-print-section helpers_die inherit EXPORT_FUNCTIONS \ - nonfatal register_success_hook remove_path_entry \ + nonfatal register_success_hook \ save_ebuild_env filter_readonly_variables preprocess_ebuild_env \ - set_unless_changed unset_unless_changed source_all_bashrcs \ + source_all_bashrcs \ ebuild_main ebuild_phase ebuild_phase_with_hooks \ _ebuild_arg_to_phase _ebuild_phase_funcs default \ _hasg _hasgq _unpack_tar \