> Date: Fri, 9 May 2025 18:10:04 +0200 > From: Alexander Bluhm <[email protected]> > > On Fri, May 09, 2025 at 08:24:33AM -0700, Andrew Hewus Fresh wrote: > > On Fri, May 09, 2025 at 08:12:02AM +0000, Lucas Gabriel Vuotto wrote: > > > On Thu, May 08, 2025 at 05:29:24PM -0700, Andrew Hewus Fresh wrote: > > > > It's pretty easy to fix fw_update. > > > > Apparently was not thinking when I wrote it. > > > > > > > > Comments, OK? > > > > > > In principle this is OK lucas, but I do have comments. > > > > > > > Index: fw_update.sh > > <SNIP> > > > > - while read -r _c _g; do > > > > - case $_c in > > > > - @cwd) _cwd="${DESTDIR}$_g" > > > > + while read -r _l; do > > > > + case ${_l%% *} in > > > > + @cwd) _cwd="${DESTDIR}${_l#* }" > > > > ;; > > > > @*) continue > > > > ;; > > > > - *) set -A _remove -- "$_cwd/$_c" "${_remove[@]}" > > > > + *) set -A _remove -- "$_cwd/$_l" "${_remove[@]}" > > > > > > Doesn't only the following take care of it? And saves you from parsing > > > the line manually. In which case, you might also want to keep the chunk > > > that adds _remove, _c and _g to local. > > > > > > + *) set -A _remove -- "$_cwd/$_g" "${_remove[@]}" > > > > You will have to better explain why attempting to remove the part of the > > filename after the first space will be more effective than failing to > > remove the part of the filename before the first space. > > In general it is very hard to write shell scripts that handle spaces > in file names correctly. This is not Perl :-) > I would recommend to avoid them in UNIX environments. Why not fix > this in ports/sysutils/firmware/bwfm/pkg/PLIST? This is the only > firmware that gets it wrong.
The names are not randomly chosen. Part of the filename is formed from SMBIOS vendor and product strings. And unfortunately those can contain spaces. I don't think our bwfm(4) driver has the code to load these particular board-specific files. So maybe we could just drop the problematic files from tha firmware package.
