mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
core extensions: fix: don't redefine extension_function_info when recursing
- otherwise when there's a chain of enable_extension() we lose the original info
This commit is contained in:
@@ -505,7 +505,9 @@ function enable_extension() {
|
|||||||
|
|
||||||
# iterate over defined functions, store them in global associative array extension_function_info
|
# iterate over defined functions, store them in global associative array extension_function_info
|
||||||
for newly_defined_function in ${new_function_list}; do
|
for newly_defined_function in ${new_function_list}; do
|
||||||
#echo "func: ${newly_defined_function} has DIR: ${extension_dir}"
|
# Check if "${newly_defined_function}" is already defined in the extension_function_info array, if not, add it
|
||||||
|
# This is to address the recursive case messing up references
|
||||||
|
[[ -v extension_function_info["${newly_defined_function}"] ]] && continue
|
||||||
extension_function_info["${newly_defined_function}"]="EXTENSION=\"${extension_name}\" EXTENSION_DIR=\"${extension_dir}\" EXTENSION_FILE=\"${extension_file}\" EXTENSION_ADDED_BY=\"${stacktrace}\""
|
extension_function_info["${newly_defined_function}"]="EXTENSION=\"${extension_name}\" EXTENSION_DIR=\"${extension_dir}\" EXTENSION_FILE=\"${extension_file}\" EXTENSION_ADDED_BY=\"${stacktrace}\""
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user