Bug 132674

Summary: [GTK] webkitdom script assumes mkdir only fails because the directory already exists
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: pnormand
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch pnormand: review+

Description Carlos Garcia Campos 2014-05-08 01:53:45 PDT
This is wrong and confusing when it happens, like in http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug/builds/41963/steps/compile-webkit/logs/stdio

FAILED: cd /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug && CC=/usr/lib/ccache/gcc-4.8 CFLAGS=-pipe\ \ -fno-exceptions\ -fno-strict-aliasing /home/slave/webkitgtk/gtk-linux-64-debug/build/Tools/gtk/generate-gtkdoc --skip-html && touch docs-build-no-html.stamp
Traceback (most recent call last):
  File "/home/slave/webkitgtk/gtk-linux-64-debug/build/Tools/gtk/generate-gtkdoc", line 194, in <module>
    webkitdom.write_doc_files()
  File "/home/slave/webkitgtk/gtk-linux-64-debug/build/Tools/gtk/webkitdom.py", line 243, in write_doc_files
    with open(os.path.join(doc_dir, 'webkitdomgtk-sections.txt'), 'w') as sections_file:
IOError: [Errno 2] No such file or directory: '/home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt'
ninja: build stopped: subcommand failed.

It can't create webkitdomgtk-sections.txt because doc_dir doesn't exist, mkdir failed but the error was ignored. I would be useful to know why mkdir failed and abort.
Comment 1 Carlos Garcia Campos 2014-05-08 01:56:44 PDT
Created attachment 231053 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-05-08 10:33:01 PDT
Committed r168474: <http://trac.webkit.org/changeset/168474>