fix syslinux splash regression [dep #186]
built upon MR #186 due to clash
fixes regression from 24658ce5 that resulted from overlooking something in reworking it from the original 2015 implementation.
with that change merging user files over default ones, if the user had provided a splash.png, the script would still convert the default splash.svg over the top of it.
this fixes the problem and restores the old logic, i.e. user provided splash.svg takes first priority, user provided splash.png second, default splash.svg third.
Merge request reports
Activity
I'm rejecting this merge request. For someone who likes to refactor code for "simplicity/maintainability", this merge request sounds wrong, it's ugly for something that can be done trivially.
Here's the fix that I pushed instead:
--- a/scripts/build/binary_syslinux +++ b/scripts/build/binary_syslinux @@ -282,7 +282,7 @@ else sed -i -e "s#@OPTIONAL_MEMTEST_INCLUDE@#include memtest.cfg#g" "${_TARGET}"/advanced.cfg fi -if [ -e "${_TARGET}/splash.svg" ] +if [ -e "${_TARGET}/splash.svg" ] && [ ! -e "${_TARGET}/splash.png" ] then case "${LB_BUILD_WITH_CHROOT}" in true) @@ -296,9 +296,8 @@ then rsvg-convert --format png --height 480 --width 640 "${_TARGET}/splash.svg" -o "${_TARGET}/splash.png" ;; esac - - rm -f "${_TARGET}/splash.svg" fi +rm -f "${_TARGET}/splash.svg"
I agree that the simplified form is preferable, but I didn't want to make any presumptions about to what extent changes to existing behaviour would be acceptable.
handled the same in both solutions:
- user provides no splash
- user provides splash.png
- user provides splash.svg
handled differently:
- user happens to provide both splash.png and splash.svg for some reason
- originally and in the submitted solution, the svg would win
- in your solution the png wins
This latter scenario is probably very unlikely, but I was being cautious to keep to the same logic.
BTW, I dislike commits authored with
jnqnfe <jnqnfe@gmail.com>
as identity, I really prefer to have a real name likeLyndon Brown <jnqnfe@gmail.com>
and I really wonder why you keep switching from one to the other (just one other thing where you are not "stable", those little details add up when you want to build trust with strangers).Understandable. The commits with
jnqnfe
as the name are those from 2015 when I'd not had my actual name set. I did consider this previously but wasn't sure if it was trivially possible to change them while preserving the original date info which I'd prefer, and so I moved away from spending further time on it. I could look into it again if you wish for me to adjust the 2015 era commits that remain...Edited by Lyndon Brown