Translate period characters in eclass names when generating variable names
authorZac Medico <zmedico@gentoo.org>
Sun, 8 Mar 2009 21:09:00 +0000 (21:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 Mar 2009 21:09:00 +0000 (21:09 -0000)
to store EXPORT_FUNCTIONS arguments. Thanks to Arfrever for reporting.

svn path=/main/trunk/; revision=12788

bin/ebuild.sh

index 3307bcdd5d3098b4dbe7aae52edbd1739d689a0b..e810446f92403453357bd576633ac34521830cda 100755 (executable)
@@ -1173,9 +1173,10 @@ inherit() {
                olocation=""
 
                export ECLASS="$1"
-               __export_funcs_var=__export_functions_${ECLASS/-/___}
-               while [[ $__export_funcs_var != ${__export_funcs_var/-/___} ]] ; do
-                       __export_funcs_var=${__export_funcs_var/-/___}
+               __export_funcs_var=__export_functions_$ECLASS
+               while [[ $__export_funcs_var =~ [-.] ]] ; do
+                       __export_funcs_var=${__export_funcs_var/-/__dash__}
+                       __export_funcs_var=${__export_funcs_var/./__dot__}
                done
                unset $__export_funcs_var