Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Nov 2013 13:15:23 -0600
From:      Mark Felder <feld@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: Problems with "spaces" in file names during stage-qa
Message-ID:  <1383592523.8452.42843741.173DA568@webmail.messagingengine.com>
In-Reply-To: <5277E719.30104@freebsd.org>
References:  <5275C412.4000909@freebsd.org> <52764CA9.9020705@freebsd.org> <5276D497.5040009@FreeBSD.org> <5277E719.30104@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Mon, Nov 4, 2013, at 12:27, Danilo E. Gondolfo wrote:
> On 11/03/13 20:56, Matthias Andree wrote:
> > 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?
> Tweak IFS is smarter :D
> It reduced my patch to this:
> 
> Index: qa.sh
> ===================================================================
> --- qa.sh    (revision 332718)
> +++ qa.sh    (working copy)
> @@ -110,6 +110,7 @@
>  ret=0
>  cd ${STAGEDIR}
>  for check in ${checks}; do
> +    IFS="$(printf '\n\t')"
>      ${check} || ret=1
>  done
> 
> But the problem with other blanks remains... =/
> 

This is at least a step in the right direction -- it fixes the hundreds
of errors when I build my multimedia/plexmediaserver port. Sadly, it
looks like nobody has a real solution for this...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1383592523.8452.42843741.173DA568>