Problems with "spaces" in file names during stage-qa

Matthias Andree mandree at FreeBSD.org
Sun Nov 3 22:56:25 UTC 2013


Am 03.11.2013 14:16, schrieb Danilo E. Gondolfo:
> Hello folks,
> 
>  I've had some problems with blank chars in file names during stage-qa.
> 
> Problems like that:
> 
> ====> Running Q/A tests (stage-qa)
> sed:
> /home/barba/Sources/freebsd-working/ports/games/lincity-ng/work/stage/usr/local/share/lincity-ng/music/01:
> No such file or directory
> sed: -: No such file or directory
> sed: pronobozo: No such file or directory
> sed: -: No such file or directory
> sed: lincity.ogg: No such file or directory
> sed:
> /home/barba/Sources/freebsd-working/ports/games/lincity-ng/work/stage/usr/local/share/lincity-ng/music/03:
> No such file or directory
> sed: -: No such file or directory
> sed: Robert: No such file or directory
> sed: van: No such file or directory
> sed: Herk: No such file or directory
> sed: -: No such file or directory
> sed: Architectural: No such file or directory
> sed: Contemplations.ogg: No such file or directory
> sed:
> /home/barba/Sources/freebsd-working/ports/games/lincity-ng/work/stage/usr/local/share/lincity-ng/music/02:
> No such file or directory
> sed: -: No such file or directory
> sed: Robert: No such file or directory
> sed: van: No such file or directory
> sed: Herk: No such file or directory
> sed: -: No such file or directory
> sed: City: No such file or directory
> sed: Blues.ogg: No such file or directory
> 
> 
> I've fixed this with the attached patch. What do you think?

Thanks for taking a stab at this.

However, the patch goes only halfway. If we really want to proof it
against blanks, we need to tweak IFS - and that would still not proof it
against tabs or line feeds in filenames.

As reference, I found David A. Wheeler's article most elucidating:
<http://www.dwheeler.com/essays/filenames-in-shell.html>

Would you like to take another, more robust, stab at the script?



More information about the freebsd-ports mailing list