trees: more robust check to avoid "make fetch"
do not use shorthand here. the test was failing to produce the desired result under some circumstances, for example when i did "./update release" i got this: make: Entering directory '/home/lbdev/lbmk/release/20240612-62-ga6b1a6bd/libreboot-20240612-62-ga6b1a6bd_src/src/stm32-vserprog' make: *** No rule to make target 'fetch'. Stop. make: Leaving directory '/home/lbdev/lbmk/release/20240612-62-ga6b1a6bd/libreboot-20240612-62-ga6b1a6bd_src/src/stm32-vserprog' ERROR script/trees: !mk src/stm32-vserprog fetch ERROR ./update: excmd: script/trees -f ERROR script/roms: Unhandled non-zero exit: ./update ERROR ./build: excmd: script/roms serprog ERROR ./update: build_release release/20240612-62-ga6b1a6bd: stm32 ERROR ./update: can't build rom images in the above circumstance, run_make_command was executed, which is not the desired behaviour; rather, fetch_project_trees or fetch_project_repo should be called, and then the script should immediately exit. it should also exit, without downloading anything, if a changelog file exists as in release archives. Signed-off-by: Leah Rowe <leah@libreboot.org>audit2
parent
a59ebb1b7c
commit
c72904b6d1
12
script/trees
12
script/trees
|
@ -58,8 +58,10 @@ build_projects()
|
|||
{
|
||||
[ $# -gt 0 ] && x_ ./update trees $_f $@
|
||||
|
||||
[ "$mode" = "fetch" ] && [ ! -f "CHANGELOG" ] && \
|
||||
eval "fetch_project_repo; return 0;"
|
||||
if [ "$mode" = "fetch" ]; then
|
||||
[ -f "CHANGELOG" ] && return 0
|
||||
fetch_project_repo; return 0
|
||||
fi
|
||||
|
||||
load_project_config "$cfgsdir"
|
||||
[ -f "$listfile" ] || listfile="" # optional on single-tree
|
||||
|
@ -122,8 +124,10 @@ handle_defconfig()
|
|||
handle_src_tree()
|
||||
{
|
||||
target_dir="$cfgsdir/$target"
|
||||
[ "$mode" = "fetch" ] && [ ! -f "CHANGELOG" ] && \
|
||||
eval "fetch_project_trees; return 1;"
|
||||
if [ "$mode" = "fetch" ]; then
|
||||
[ -f "CHANGELOG" ] && return 1
|
||||
fetch_project_trees; return 1
|
||||
fi
|
||||
|
||||
load_project_config "$target_dir"
|
||||
x_ mkdir -p "$elfdir/$target"
|
||||
|
|
Loading…
Reference in New Issue