#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:¶
-
Type: Enhancement and Cleanup
-
Impact: Normal
-
Reference to related issue (URL):
https://github.com/rear/rear/issues/1921 -
How was this pull request tested?
Not at all tested because currently I have no UEFI test system -
Brief description of the changes in this pull request:
Avoidnullglobpitfalls in 250_populate_efibootimg.sh
like the workaround in
https://github.com/rear/rear/issues/1921#issuecomment-426999409
and
generally overhalued that script
in particular changed code like
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.]