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 559281 - Correct check for existance of gtkdoc-rebase
Correct check for existance of gtkdoc-rebase
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.11
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-04 14:56 UTC by Peter Kjellerstedt
Modified: 2008-11-06 21:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Correct check for existence of gtkdoc-rebase (3.45 KB, patch)
2008-11-04 14:57 UTC, Peter Kjellerstedt
committed Details | Review

Description Peter Kjellerstedt 2008-11-04 14:56:54 UTC
The current checks in gtk-doc.make and gtk-doc.notmpl.make for whether gtkdoc-rebase exists in the $PATH are not correct. In case gtkdoc-rebase actually does not exist, the test will fail and abort the make, which I doubt was the intention given that the tests exist in the first place. The attached patch should fix this.
Comment 1 Peter Kjellerstedt 2008-11-04 14:57:49 UTC
Created attachment 121959 [details] [review]
Correct check for existence of gtkdoc-rebase
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2008-11-04 15:01:09 UTC
I don't think thsi is needed. The reason is that the command start with "-", which means don't fail.
Comment 3 Peter Kjellerstedt 2008-11-04 19:49:16 UTC
Look again. It is the first occurrence (where there is an incorrect test with "which gtkdoc-rebase ...") that will cause a problem. The second will just produce ignored errors (as you mention). However, I suggest to fix them both in the same way (as I do not like errors, even if they are ignored).
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2008-11-05 06:58:18 UTC
How is the first not like the 2nd? The whole rule starts with "-".
This is going back and forth and I don't want to fix it for one side and break it for the other. The '!' - is that suported by a plain sh? It seems to have the desired effect.

$ which peng >/dev/null && peng; echo $?
1
ensonic@sterni:~/projects/gtk-doc$ which echo >/dev/null && echo; echo $?

0
ensonic@sterni:~/projects/gtk-doc$ ! which peng >/dev/null || peng; echo $?
0
ensonic@sterni:~/projects/gtk-doc$ ! which echo >/dev/null || echo; echo $?

0
Comment 5 Peter Kjellerstedt 2008-11-05 09:09:25 UTC
Oh, I missed that. Seems a bit weird to me to allow the installation to fail, but that is a different issue. Anyway, the construct with "! which ..." should be fine with POSIX shells (tested with dash). Generally a construct like "!A || B" is preferred over "A && B" when writing shell scripts. This is because the latter will result in $? indicating a failure, even if both expressions actually prevent B from running.
Comment 6 Frederic Peters 2008-11-05 22:52:32 UTC
	* gtk-doc.make:
	* gtk-doc.notmpl.make:
	* tests/gtk-doc.make:
	* tests/gtk-doc.notmpl.make:
	  Correct check for existance of gtkdoc-rebase (better fix than the
	  previous one #508897). Fixes #559281.

This commit broke buildbots, as can be seen at http://jhbuild.bxlug.be:8080/gtk-doc


Could you look at the build failure?
  http://jhbuild.bxlug.be:8080/builders/gtk-doc-mandriva-32/builds/182/steps/gtk-doc%20build/logs/stdio


Thanks.
Comment 7 Peter Kjellerstedt 2008-11-06 10:51:50 UTC
The build break does not seem directly related to my patch, but rather to the fact that the '-' at the beginning of the install-data-local rules were removed. 
This in itself should be correct, but in one way or another the test documentation is built (or has been built at some earlier time), and when make install then tries to install it in /tester it fails (due to the fact that no $(HTML_DIR) is set). I cannot tell from the log whether the test documentation is built as part of the buildbot run, or if it is just some leftover from some manual testing (it would have been nice if the commands executed by buildbot were included in the log...)

To make the installation of the test documentation actually work, I guess configure.in would have to be taught about $(HTML_DIR), i.e., some parts of gtk-doc.m4 needs to be included. Alternatively, make sure the test documentation does not exist.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2008-11-06 21:03:15 UTC
Peter, thanks for the analysis. I removed the complete install rules from the tests. I don't see how make check can install the docs generated in the tests in a meaningfuly way (it could install them in the builddir somehow). The tests are meant to test the parser anyway.

Frederic, the builds are green again. Thanks for the notice.