On Fri, Sep 08, 2006 at 07:58:31AM +0200, Martin Costabel wrote:
> Alexander Hansen wrote:
> >
> > /bin/cp -r GPL\
> > /Volumes/Archive/fink.build/root-contacts-1.1-1/sw/share/doc/contacts/
> > usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target
> > cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory
> > ### execution of /bin/cp failed, exit code 64
> >
> > It appears that in:
> >
> > DocFiles: GPL\ License.rtf README COPYING
> >
> > the first file isn't getting parsed correctly
[Martin's comments are re-ordered slightly by dmacks]
> This is a feature (AKA Not A Bug?) in fink HEAD. It declares docfiles
> with spaces in their names illegal (without informing anyone, though.)
> If you use realeased fink, the corresponding line reads
>
> /usr/bin/install -c -p -m 644 GPL\ License.rtf README COPYING
> /sw/src/fink.build/root-contacts-1.1-1/sw/share/doc/contacts/
>
> and it works correctly.
Interesting! The implementation of in branch_0_24 begins:
@docfiles = split(/\s+/, $self->param("DocFiles"));
So whitespace has never really been handled correctly. It's only an
accident of the subsequent handling in the case where renaming is not
done (no colon character in a @docfiles word):
foreach $docfile (@docfiles) {
$docfilelist .= " $docfile";
}
$install_script .= "\n/usr/bin/install -c -p -m 644$docfilelist
%i/share/doc/%n/";
that the backslash actually does accomplish the desired outcome for
this specific--albeit probably the most common--whitespace usage. If
there had been a colon, the whitespace-separated words would be copied
individually as in HEAD.
> Apparently this is the price to pay for allowing directories in the
> DocFiles field.
I think the critical factor is that we no longer have the short-cut
handler when there is no colon character, so the whitespace-separated
words are *always* copied individually.
> I wonder if perl doesn't have the possibility to split a line at "true"
> spaces that are neither escaped not between quotes, like any shell is
> able to do. This would allow better parsing of the DocFiles field and
> would re-allow spaces in file names.
Yup...Fink::Text::ParseWords can do that parsing instead of the
brain-deadish split() function. Then we'd have to be careful to
re-quote whitespace and other shell special characters before passing
it back to a shell command. Also, HEAD supports conditionals in
DocFiles, and conditionals always act on "the word following the
conditional expression". I *think* the conditional handler knows about
quoting, but if not we'd have to teach it.
dan
--
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users