After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769125 - gtkdoc-mkhtml/pdf fails on spaces in search path
gtkdoc-mkhtml/pdf fails on spaces in search path
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.25
Other Linux
: Normal normal
: 1.26
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-24 04:17 UTC by Nirbheek Chauhan
Modified: 2016-09-29 21:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix more quoting issues with mkhtml/pdf (5.57 KB, patch)
2016-07-24 04:17 UTC, Nirbheek Chauhan
none Details | Review
mkhtml/pdf: Fix quoting of search path (5.13 KB, patch)
2016-07-30 10:46 UTC, Nirbheek Chauhan
committed Details | Review
mkhtml/pdf: Fix quoting of search path (5.20 KB, patch)
2016-09-29 20:59 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Nirbheek Chauhan 2016-07-24 04:17:52 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.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2016-07-28 07:32:06 UTC
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?
Comment 2 Nirbheek Chauhan 2016-07-28 14:24:21 UTC
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.
Comment 3 Nirbheek Chauhan 2016-07-30 10:46:42 UTC
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.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2016-09-29 20:59:50 UTC
The following fix has been pushed:
4ba537d mkhtml/pdf: Fix quoting of search path
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2016-09-29 20:59:58 UTC
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.