From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: /, modules/
Date: Sun, 9 Feb 2014 17:57:44 +0000 (UTC) [thread overview]
Message-ID: <1391963145.38614e63db2a5a124bc5971309c80c5c9533770e.ulm@gentoo> (raw)
Message-ID: <20140209175744.0NE93oc_jqAv5OZW8ZPtVgmkcRhks7NAJ-tki6VlgVk@z> (raw)
commit: 38614e63db2a5a124bc5971309c80c5c9533770e
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 9 16:25:45 2014 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> 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 <ulm@gentoo.org>
+
+ * 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 <ulm@gentoo.org>
* 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
next reply other threads:[~2014-02-09 17:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-09 16:23 Ulrich Müller [this message]
2014-02-09 17:57 ` [gentoo-commits] proj/eselect:master commit in: /, modules/ Ulrich Müller
-- strict thread matches above, loose matches on Subject: below --
2023-08-07 16:22 Ulrich Müller
2023-06-12 16:24 Ulrich Müller
2019-11-28 13:16 Ulrich Müller
2018-01-24 10:03 Ulrich Müller
2018-01-08 23:30 Ulrich Müller
2017-12-25 11:00 Ulrich Müller
2017-05-22 11:27 Ulrich Müller
2017-05-06 13:24 Ulrich Müller
2016-12-06 7:05 Ulrich Müller
2015-01-18 22:01 Ulrich Müller
2014-08-28 13:02 Ulrich Müller
2014-05-24 7:02 Ulrich Müller
2014-02-25 10:09 Ulrich Müller
2014-02-09 17:57 Ulrich Müller
2013-11-14 16:47 Ulrich Müller
2013-08-24 16:52 Ulrich Mueller
2013-07-16 14:27 Ulrich Mueller
2013-07-14 15:24 Ulrich Mueller
2013-02-22 22:24 Ulrich Mueller
2012-12-06 21:02 Ulrich Mueller
2012-09-12 22:09 Ulrich Mueller
2012-08-19 20:03 Ulrich Mueller
2012-06-27 17:02 Ulrich Mueller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391963145.38614e63db2a5a124bc5971309c80c5c9533770e.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox