Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 279911 Details for
Bug 374875
sys-apps/openrc: warn about removal of bash array support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
0001-add-error-messages-for-the-use-of-bash-arrays.patch
0001-add-error-messages-for-the-use-of-bash-arrays.patch (text/plain), 1.64 KB, created by
William Hubbs
on 2011-07-12 20:38:05 UTC
(
hide
)
Description:
0001-add-error-messages-for-the-use-of-bash-arrays.patch
Filename:
MIME Type:
Creator:
William Hubbs
Created:
2011-07-12 20:38:05 UTC
Size:
1.64 KB
patch
obsolete
>From c41941650a51a68e37db9f5a522f301838fffdc4 Mon Sep 17 00:00:00 2001 >From: William Hubbs <williamh@gentoo.org> >Date: Tue, 12 Jul 2011 15:29:04 -0500 >Subject: [PATCH] add error messages for the use of bash arrays > >Currently, we allow the use of bash arrays for some configuration settings. >This is undocumented, so I want to remove the support from openrc. > >The first phase of this removal will be this commit which adds error >messages to encourage people not to use them. Error messages must be >used so that the output goes to stdout and does not interfeer with the >return value of the functions. > >X-Gentoo-Bug: 374875 >X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=374875 >--- > init.d/net.lo.in | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > >diff --git a/init.d/net.lo.in b/init.d/net.lo.in >index a1ec7c3..0a0d0c4 100644 >--- a/init.d/net.lo.in >+++ b/init.d/net.lo.in >@@ -48,6 +48,9 @@ _get_array() > if [ -n "${BASH}" ]; then > case "$(declare -p "$1" 2>/dev/null)" in > "declare -a "*) >+ eerror You are using a bash array for $1. >+ eerror This feature will be removed in the future. >+ eerror Please see net.example for the correct format for $1. > eval "set -- \"\${$1[@]}\"" > for _a; do > printf "%s\n" "${_a}" >@@ -69,6 +72,9 @@ _flatten_array() > if [ -n "${BASH}" ]; then > case "$(declare -p "$1" 2>/dev/null)" in > "declare -a "*) >+ eerror You are using a bash array for $1. >+ eerror This feature will be removed in the future. >+ eerror Please see net.example for the correct format for $1. > eval "set -- \"\${$1[@]}\"" > for x; do > printf "'%s' " "$(printf "$x" | sed "s:':'\\\'':g")" >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 374875
: 279911