Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 541942 Details for
Bug 662468
sys-apps/portage: Improve detection of array variables using ${param@a}
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Move and rename function as requested
diff2.txt (text/plain), 1.83 KB, created by
konsolebox
on 2018-08-01 14:40:59 UTC
(
hide
)
Description:
Move and rename function as requested
Filename:
MIME Type:
Creator:
konsolebox
Created:
2018-08-01 14:40:59 UTC
Size:
1.83 KB
patch
obsolete
>diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh >index 28ca945..45f75d1 100644 >--- a/bin/isolated-functions.sh >+++ b/bin/isolated-functions.sh >@@ -569,4 +569,14 @@ __eqatag() { > ) >> "${T}"/qa.log > } > >+if [[ BASH_VERSINFO -gt 4 || (BASH_VERSINFO -eq 4 && BASH_VERSINFO[1] -ge 4) ]] ; then >+ ___is_indexed_array_var() { >+ [[ ${!1@a} == *a* ]] >+ } >+else >+ ___is_indexed_array_var() { >+ [[ $(declare -p "$1" 2>/dev/null) == 'declare -a'* ]] >+ } >+fi >+ > true >diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh >index 5c9f957..10d7d24 100644 >--- a/bin/phase-helpers.sh >+++ b/bin/phase-helpers.sh >@@ -853,7 +853,7 @@ __eapi4_src_install() { > THANKS BUGS FAQ CREDITS CHANGELOG ; do > [[ -s "${d}" ]] && dodoc "${d}" > done >- elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then >+ elif ___is_indexed_array_var DOCS ; then > dodoc "${DOCS[@]}" > else > dodoc ${DOCS} >@@ -861,7 +861,7 @@ __eapi4_src_install() { > } > > __eapi6_src_prepare() { >- if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then >+ if ___is_indexed_array_var PATCHES ; then > [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}" > elif [[ -n ${PATCHES} ]]; then > eapply ${PATCHES} >@@ -991,7 +991,7 @@ if ___eapi_has_einstalldocs; then > THANKS BUGS FAQ CREDITS CHANGELOG ; do > [[ -f ${d} && -s ${d} ]] && docinto / && dodoc "${d}" > done >- elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then >+ elif ___is_indexed_array_var DOCS ; then > [[ ${#DOCS[@]} -gt 0 ]] && docinto / && dodoc -r "${DOCS[@]}" > else > [[ ${DOCS} ]] && docinto / && dodoc -r ${DOCS} >@@ -999,7 +999,7 @@ if ___eapi_has_einstalldocs; then > ) > > ( >- if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then >+ if ___is_indexed_array_var HTML_DOCS ; then > [[ ${#HTML_DOCS[@]} -gt 0 ]] && \ > docinto html && dodoc -r "${HTML_DOCS[@]}" > else
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 662468
:
541722
| 541942