Bug 34637 - update-webkit-auxiliary-libs does not like a space in the path to the WebKit folder
Summary: update-webkit-auxiliary-libs does not like a space in the path to the WebKit ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-05 02:02 PST by Leith Bade
Modified: 2010-02-08 02:48 PST (History)
1 user (show)

See Also:


Attachments
Proposed patch. (1.22 KB, patch)
2010-02-06 16:59 PST, Leith Bade
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leith Bade 2010-02-05 02:02:52 PST
I have just downloaded a fresh tar of the source code. After extracting I executed update-webkit from cygwin.

The result was a spew of error messages like these:
cp: cannot create regular file `/home/Leith\nBade/WebKit/WebKitLibraries/win/lib/libxslt.lib': No such file or directory
cp: cannot create regular file `/home/Leith\nBade/WebKit/WebKitLibraries/win/lib/pthreadVC2.lib': No such file or directory
cp: cannot create regular file `/home/Leith\nBade/WebKit/WebKitLibraries/win/lib/SQLite3.lib': No such file or directory
mv: cannot move `/tmp/webkitlibsFSMnc5X/WebKitAuxiliaryLibrary.headers' to `/home/Leith\nBade/WebKit/WebKitLibraries/win': No such file or directory
Couldn't move WebKitAuxiliaryLibrary.headers to /home/Leith
Bade/WebKit/WebKitLibraries/win.
The WebKitAuxiliaryLibrary has been sucessfully installed in
 /home/Leith
Bade/WebKit/WebKitLibraries/win

It would appear update-webkit-auxiliary-libs some how screws up the path to the WebKit folder "/home/Leith Bade/WebKit" and replaces that space in "Leith Bade" with "Leith/nBade" (newline).

Also the other bug worth mentioning here is that the message "The WebKitAuxiliaryLibrary has been sucessfully installed in" is clearly misleading as it does not check if the unzip works.
Comment 1 Leith Bade 2010-02-05 02:55:36 PST
It would appear that both environment variables WEBKITOUTPUTDIR and WEBKITLIBRARIESDIR are set incorrectly.

WEBKITOUTPUTDIR was C:\home\cygwin\Leith which does not exist ("C:\home\cygwin\Leith Bade" does).
Comment 2 Leith Bade 2010-02-05 03:00:16 PST
Don't suppose this is related to the change for #31228 ?
Comment 3 Leith Bade 2010-02-06 16:28:58 PST
I have traced it down to whatever sets the WEBKITLIBRARIESDIR environment variable in the registry. It seems to replace the space with a newline wen it sets the reg key.
Comment 4 Leith Bade 2010-02-06 16:37:25 PST
OK it seems putting quotes around $WEBKITLIBRARIESDIR fixes the problem.

eg cygpath -u "$WEBKITLIBRARIESDIR"

otherwise cygpath treats the space as seperating two different paths to convert hence why it puts each respective path on a new line in it's output.
Comment 5 Leith Bade 2010-02-06 16:59:53 PST
Created attachment 48301 [details]
Proposed patch.
Comment 6 Leith Bade 2010-02-06 17:02:14 PST
I forgot to put a fix in for the "The
WebKitAuxiliaryLibrary has been sucessfully installed in" bug. This might need to go under a different bug #?

(I am not familiar enough with Perl to confidently make that change)
Comment 7 Leith Bade 2010-02-06 19:08:39 PST
Also in order to support Visual Studio, there needs to be a trailing '\' in the environment variable.
Comment 8 Darin Adler 2010-02-07 14:59:50 PST
Comment on attachment 48301 [details]
Proposed patch.

Now we can handle paths with spaces, but not ones with single quotes. A step in the right direction, I guess.
Comment 9 Leith Bade 2010-02-07 17:04:12 PST
(In reply to comment #8)
> (From update of attachment 48301 [details])
> Now we can handle paths with spaces, but not ones with single quotes. A step in
> the right direction, I guess.

Yeah I suppose some people might have a `'` in their user name. Ag. "Leith's Computer" or something like that.

Double quotes could fix this... As `"` is an illegal filename char in Windows.

I note that in webkitdirs.pm there is an inconsistent use of cygpath.

Some use `'`, some use `"` and some even do no quotes at all...

Should the entire file be cleaned up to use only `"`?
Comment 10 WebKit Commit Bot 2010-02-08 02:48:23 PST
Comment on attachment 48301 [details]
Proposed patch.

Clearing flags on attachment: 48301

Committed r54477: <http://trac.webkit.org/changeset/54477>
Comment 11 WebKit Commit Bot 2010-02-08 02:48:29 PST
All reviewed patches have been landed.  Closing bug.