Skip to content

Commit a56b299

Browse files
author
Damian Rouson
committed
Corrected bison stack management to prevent infinite loop.
Signed-off-by: Damian Rouson <[email protected]>
1 parent b606aa6 commit a56b299

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

install.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,18 @@ find_or_install()
449449
printf "$this_script: Using the $package executable $executable found in the PATH.\n"
450450
YACC=yacc
451451
stack_push acceptable_in_path $package $executable
452+
# Remove bison from the dependency stack
453+
stack_pop dependency_pkg package_done
454+
stack_pop dependency_exe executable_done
455+
stack_pop dependency_path package_done_path
456+
# Put $package onto the script_installed log
457+
stack_push script_installed package_done
458+
stack_push script_installed executable_done
459+
stack_push script_installed package_done_path
460+
# Halt the recursion and signal that there are no prerequisites to build
461+
stack_push dependency_pkg "none"
462+
stack_push dependency_exe "none"
463+
stack_push dependency_path "none"
452464
fi
453465

454466
else # $package not in PATH and not yet installed by this script
@@ -469,7 +481,7 @@ find_or_install()
469481
fi
470482
fi
471483

472-
echo "$this_script: Starting dependency stack (top to bottom = left to right):"
484+
echo "$this_script: Updated dependency stack (top to bottom = left to right):"
473485
stack_print dependency_pkg
474486

475487
stack_size dependency_pkg num_stacked

0 commit comments

Comments
 (0)