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 322DB138CE3 for ; Sun, 9 Feb 2014 16:23:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7B1CE0B36; Sun, 9 Feb 2014 16:23:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3FFD1E0B36 for ; Sun, 9 Feb 2014 16:23:50 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 56A6F33F8B6 for ; Sun, 9 Feb 2014 16:23:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 1A8E518852 for ; Sun, 9 Feb 2014 16:23:48 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1391963145.38614e63db2a5a124bc5971309c80c5c9533770e.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: /, modules/ X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog modules/rc.eselect X-VCS-Directories: / modules/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 38614e63db2a5a124bc5971309c80c5c9533770e X-VCS-Branch: master Date: Sun, 9 Feb 2014 16:23:48 +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: b0449082-9552-427b-977f-5181e6ca3f57 X-Archives-Hash: 1cebc033722c22aff4a8956576ba57fb commit: 38614e63db2a5a124bc5971309c80c5c9533770e Author: Ulrich Müller gentoo org> AuthorDate: Sun Feb 9 16:25:45 2014 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Feb 9 16:25:45 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=38614e63 Do not source functions.sh in rc module, bug 373219. * modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, in order to avoid sourcing functions.sh, bug 373219. Remove baselayout-1 compatibility code. (source_rc_functions): Remove function. (do_show): Don't call source_rc_functions. --- ChangeLog | 8 ++++++++ modules/rc.eselect | 17 ++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61e7e66..a4cec21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-02-09 Ulrich Müller + + * modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, + in order to avoid sourcing functions.sh, bug 373219. + Remove baselayout-1 compatibility code. + (source_rc_functions): Remove function. + (do_show): Don't call source_rc_functions. + 2014-01-19 Ulrich Müller * libs/package-manager.bash.in (arch): Recognise aarch64*/arm64. diff --git a/modules/rc.eselect b/modules/rc.eselect index a661445..dc8b0d5 100644 --- a/modules/rc.eselect +++ b/modules/rc.eselect @@ -7,22 +7,11 @@ inherit config DESCRIPTION="Manage /etc/init.d scripts in runlevels" MAINTAINER="eselect@gentoo.org" -# source_rc_functions PRIVATE -# API for OpenRC -source_rc_functions() { - [[ ${RC_GOT_FUNCTIONS} = yes ]] && return - source "${EPREFIX}/etc/init.d/functions.sh" \ - || die "Failed to source functions.sh" -} - # get_runlevel PRIVATE # determine the current runlevel -# this is only functional if source_rc_functions has been called before get_runlevel() { - if type rc_runlevel &>/dev/null; then - rc_runlevel || die "rc_runlevel failed" - elif [[ -n ${SOFTLEVEL} ]]; then - echo "${SOFTLEVEL}" + if type rc-status &>/dev/null; then + rc-status -r || die "rc_status failed" else die "Cannot determine runlevel" fi @@ -240,8 +229,6 @@ describe_show_options() { do_show() { local runlevel all unused n x - source_rc_functions - if [[ $# -eq 0 ]]; then set -- "$(get_runlevel)" else 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 60B94138CE3 for ; Sun, 9 Feb 2014 17:57:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 18C57E0BA5; Sun, 9 Feb 2014 17:57:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 86D87E0BA5 for ; Sun, 9 Feb 2014 17:57:47 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A32B833F912 for ; Sun, 9 Feb 2014 17:57:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 1322818852 for ; Sun, 9 Feb 2014 17:57:44 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1391963145.38614e63db2a5a124bc5971309c80c5c9533770e.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: /, modules/ X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog modules/rc.eselect X-VCS-Directories: / modules/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 38614e63db2a5a124bc5971309c80c5c9533770e X-VCS-Branch: master Date: Sun, 9 Feb 2014 17:57:44 +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: 3371ef12-740e-4f6a-9997-ae7b6e9d1ec6 X-Archives-Hash: 520b702a539f9e6d62b72622fdd0e4ea Message-ID: <20140209175744.0NE93oc_jqAv5OZW8ZPtVgmkcRhks7NAJ-tki6VlgVk@z> commit: 38614e63db2a5a124bc5971309c80c5c9533770e Author: Ulrich Müller gentoo org> AuthorDate: Sun Feb 9 16:25:45 2014 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Feb 9 16:25:45 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=38614e63 Do not source functions.sh in rc module, bug 373219. * modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, in order to avoid sourcing functions.sh, bug 373219. Remove baselayout-1 compatibility code. (source_rc_functions): Remove function. (do_show): Don't call source_rc_functions. --- ChangeLog | 8 ++++++++ modules/rc.eselect | 17 ++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61e7e66..a4cec21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-02-09 Ulrich Müller + + * modules/rc.eselect (get_runlevel): Call "rc-status -r" directly, + in order to avoid sourcing functions.sh, bug 373219. + Remove baselayout-1 compatibility code. + (source_rc_functions): Remove function. + (do_show): Don't call source_rc_functions. + 2014-01-19 Ulrich Müller * libs/package-manager.bash.in (arch): Recognise aarch64*/arm64. diff --git a/modules/rc.eselect b/modules/rc.eselect index a661445..dc8b0d5 100644 --- a/modules/rc.eselect +++ b/modules/rc.eselect @@ -7,22 +7,11 @@ inherit config DESCRIPTION="Manage /etc/init.d scripts in runlevels" MAINTAINER="eselect@gentoo.org" -# source_rc_functions PRIVATE -# API for OpenRC -source_rc_functions() { - [[ ${RC_GOT_FUNCTIONS} = yes ]] && return - source "${EPREFIX}/etc/init.d/functions.sh" \ - || die "Failed to source functions.sh" -} - # get_runlevel PRIVATE # determine the current runlevel -# this is only functional if source_rc_functions has been called before get_runlevel() { - if type rc_runlevel &>/dev/null; then - rc_runlevel || die "rc_runlevel failed" - elif [[ -n ${SOFTLEVEL} ]]; then - echo "${SOFTLEVEL}" + if type rc-status &>/dev/null; then + rc-status -r || die "rc_status failed" else die "Cannot determine runlevel" fi @@ -240,8 +229,6 @@ describe_show_options() { do_show() { local runlevel all unused n x - source_rc_functions - if [[ $# -eq 0 ]]; then set -- "$(get_runlevel)" else