[build]: stop prompt during build (#6585)
Some commands used during build will prompt user interactively, but this is not expected during build. Since most output is collected into log file, user could not see the prompt and feel the build process hangs. - How I did it Use mv command in non interactive mode Redirect stdin to null if command output is collected into log file.
This commit is contained in:
parent
fb0b999361
commit
0e7287856c
@ -48,7 +48,7 @@ log_green = echo -e "$(GREEN)$(1)$(GRAY)"
|
|||||||
FLUSH_LOG = rm -f $@.log
|
FLUSH_LOG = rm -f $@.log
|
||||||
|
|
||||||
LOG_SIMPLE = &>> $(PROJECT_ROOT)/$@.log || { [ $$? -eq 0 ] || pushd $(PROJECT_ROOT) > /dev/null ; ./update_screen.sh -e $@ ; popd > /dev/null ; false ; }
|
LOG_SIMPLE = &>> $(PROJECT_ROOT)/$@.log || { [ $$? -eq 0 ] || pushd $(PROJECT_ROOT) > /dev/null ; ./update_screen.sh -e $@ ; popd > /dev/null ; false ; }
|
||||||
LOG = |& $(PROJECT_ROOT)/scripts/process_log.sh $(PROCESS_LOG_OPTION) &>> $(PROJECT_ROOT)/$@.log ; test $${PIPESTATUS[-2]} -eq 0 || { [ $$? -eq 0 ] || pushd $(PROJECT_ROOT) > /dev/null ; ./update_screen.sh -e $@ ; popd > /dev/null ; false ; }
|
LOG = < /dev/null |& $(PROJECT_ROOT)/scripts/process_log.sh $(PROCESS_LOG_OPTION) &>> $(PROJECT_ROOT)/$@.log ; test $${PIPESTATUS[-2]} -eq 0 || { [ $$? -eq 0 ] || pushd $(PROJECT_ROOT) > /dev/null ; ./update_screen.sh -e $@ ; popd > /dev/null ; false ; }
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Header and footer for each target
|
## Header and footer for each target
|
||||||
|
6
slave.mk
6
slave.mk
@ -471,7 +471,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
|
|||||||
# Clean up
|
# Clean up
|
||||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||||
# Take built package(s)
|
# Take built package(s)
|
||||||
mv $(addprefix $($*_SRC_PATH)/../, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS)) $(DEBS_PATH) $(LOG)
|
mv -f $(addprefix $($*_SRC_PATH)/../, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS)) $(DEBS_PATH) $(LOG)
|
||||||
|
|
||||||
# Save the target deb into DPKG cache
|
# Save the target deb into DPKG cache
|
||||||
$(call SAVE_CACHE,$*,$@)
|
$(call SAVE_CACHE,$*,$@)
|
||||||
@ -572,7 +572,7 @@ $(addprefix $(PYTHON_DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS)) : $(PYTHON_DEBS_PA
|
|||||||
# Clean up
|
# Clean up
|
||||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||||
# Take built package(s)
|
# Take built package(s)
|
||||||
mv $(addprefix $($*_SRC_PATH)/deb_dist/, $* $($*_DERIVED_DEBS)) $(PYTHON_DEBS_PATH) $(LOG)
|
mv -f $(addprefix $($*_SRC_PATH)/deb_dist/, $* $($*_DERIVED_DEBS)) $(PYTHON_DEBS_PATH) $(LOG)
|
||||||
|
|
||||||
# Save the target deb into DPKG cache
|
# Save the target deb into DPKG cache
|
||||||
$(call SAVE_CACHE,$*,$@)
|
$(call SAVE_CACHE,$*,$@)
|
||||||
@ -609,7 +609,7 @@ $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PA
|
|||||||
# clean up
|
# clean up
|
||||||
if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then quilt pop -a -f; [ -d .pc ] && rm -rf .pc; fi
|
if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then quilt pop -a -f; [ -d .pc ] && rm -rf .pc; fi
|
||||||
popd $(LOG_SIMPLE)
|
popd $(LOG_SIMPLE)
|
||||||
mv $($*_SRC_PATH)/dist/$* $(PYTHON_WHEELS_PATH) $(LOG)
|
mv -f $($*_SRC_PATH)/dist/$* $(PYTHON_WHEELS_PATH) $(LOG)
|
||||||
|
|
||||||
# Save the target deb into DPKG cache
|
# Save the target deb into DPKG cache
|
||||||
$(call SAVE_CACHE,$*,$@)
|
$(call SAVE_CACHE,$*,$@)
|
||||||
|
Loading…
Reference in New Issue
Block a user