#1922 PR merged: avoid nullglob pitfalls in 250_populate_efibootimg.sh (issue #1921) and generally overhalued that script

Labels: enhancement, cleanup, fixed / solved / done

jsmeix opened issue at 2018-10-05 11:56:

if DIR_OF_SOME_FILES_EXISTS ; then
    cp DIR_OF_SOME_FILES/* ...
    StopIfError "Could not copy ..."
else
    Log "Warning: did not find DIR_OF_SOME_FILES"
fi

to something like

if SOME_FILES_EXISTS ; then
    cp SOME_FILES ...
else
    Log "Warning: did not find SOME_FILES"
fi

because the former code has wrong logic from my point of view:
The former code errors out when cp SOME_FILES fails
but proceeds (with only a warning in the log)
if SOME_FILES do not exist.
If it is essential to copy SOME_FILES it would also
have to error out when SOME_FILES do not exist.
Because the former code indicates it is not essential to copy SOME_FILES
I think it should also not error out when cp SOME_FILES fails.

@gdha @gozora
could you please review my changes carefully.

Could you please also have a look at the FIXME parts.
Perhaps we could clean up all of them.

gozora commented at 2018-10-05 12:26:

@jsmeix I'll try to take a look over this weekend (if time permits ...)

V.

jsmeix commented at 2018-10-08 08:13:

@gozora @gdha
thank you for your review!


[Export of Github issue for rear/rear.]