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 789531 - Don't depend on the system shell
Don't depend on the system shell
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.27
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-26 18:56 UTC by Christoph Reiter (lazka)
Modified: 2017-11-12 20:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scanobj: Don't depend on the system shell (3.14 KB, patch)
2017-10-26 19:43 UTC, Christoph Reiter (lazka)
committed Details | Review
scanobj: Don't depend on the system shell (3.15 KB, patch)
2017-11-01 20:42 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Christoph Reiter (lazka) 2017-10-26 18:56:25 UTC
This the last thing currently patched in MSYS2 to make the new gtk-doc work on Windows (some packages still produce empty docs and I haven't looked into that). I'm not that familiar with the scangobj interface and if there are any other dependencies on the shell besides argument splitting, which I have replaced using "shlex.split()".

https://github.com/Alexpux/MINGW-packages/blob/c56636ab4c0d78e32dae7d0d35389b0a71433269/mingw-w64-gtk-doc/win-fixes.patch

If this is something that looks good for inclusion I can turn it into a proper patch.
Comment 1 Christoph Reiter (lazka) 2017-10-26 19:43:05 UTC
Created attachment 362372 [details] [review]
scanobj: Don't depend on the system shell

* Instead of piping to /dev/null use check_output which pipes the output
  to a return value by default
* Instead of passing the argument list through as is, split them with shlex.split()
  and pass them as a proper argument list.

This makes it possible to run gtk-doc under Windows with mingw.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2017-11-01 20:42:12 UTC
The following fix has been pushed:
d334d55 scanobj: Don't depend on the system shell
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2017-11-01 20:42:20 UTC
Created attachment 362785 [details] [review]
scanobj: Don't depend on the system shell

* Instead of piping to /dev/null use check_output which pipes the output
  to a return value by default
* Instead of passing the argument list through as is, split them with shlex.split()
  and pass them as a proper argument list.

This makes it possible to run gtk-doc under Windows with mingw.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2017-11-01 20:42:55 UTC
Thanks, committed with a small quoting change.
Comment 5 Christoph Reiter (lazka) 2017-11-01 20:46:03 UTC
Thanks!
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2017-11-02 15:47:01 UTC
This caused some regression
https://bugzilla.gnome.org/show_bug.cgi?id=789800
could you take a look too?
Comment 7 Christoph Reiter (lazka) 2017-11-05 12:13:01 UTC
So, given the problem stated in https://bugzilla.gnome.org/show_bug.cgi?id=789800#c10

Should I look into fixing those cases by converting leading arguments containing "=" to env vars or leave it and let webkit not pass env vars in the command?
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2017-11-12 20:27:37 UTC
If we can easily print a warning, that might be nice. Since the fix is easy for the affected project, I would not complicate the code if possible.