GNOME Bugzilla – Bug 769125
gtkdoc-mkhtml/pdf fails on spaces in search path
Last modified: 2016-09-29 21:00:39 UTC
Created attachment 332032 [details] [review] Fix more quoting issues with mkhtml/pdf Bug 753145 fixed breakage with spaces in the file path, but didn't fix the same issue in the search path, the module name, image directories, etc. The attached patch fixes all these issues. The shell scripts now use proper shell quoting everywhere.
Review of attachment 332032 [details] [review]: ::: gtkdoc-mkhtml.in @@ +76,2 @@ else + path_arg=("--path" "$searchpath") The () is bash syntax for arrays. This script is using /bin/sh. Can you only fix the quoting and not switch to arrays?
Hum, I didn't realize that the script required POSIX shell syntax. It's a bit trickier and uglier to fix this with POSIX sh (and might be impossible for $imgdirs in gtkdoc-mkpdf), but I'll give it a shot.
Created attachment 332387 [details] [review] mkhtml/pdf: Fix quoting of search path This uses only POSIX sh, but doesn't care about $imgdirs in mkpdf. This is probably fine since the dirs will be relative paths and you can ensure that those don't have spaces.
The following fix has been pushed: 4ba537d mkhtml/pdf: Fix quoting of search path
Created attachment 336548 [details] [review] mkhtml/pdf: Fix quoting of search path We need to do quoting using POSIX sh syntax, so this fix is uglier than simply using bash arrays. This still leaves the quoting of imgdirs in mkpdf and I can't see a non-terrible way to quote that in POSIX sh syntax, but that is usually a relative path and is less likely to have spaces.