Merge lp:~vanvugt/compiz/fix-1023742 into lp:compiz/0.9.8

Proposed by Daniel van Vugt
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3285
Merged at revision: 3291
Proposed branch: lp:~vanvugt/compiz/fix-1023742
Merge into: lp:compiz/0.9.8
Diff against target: 14 lines (+3/-1)
1 file modified
po/CMakeLists.txt (+3/-1)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1023742
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
jenkins (community) continuous-integration Approve
Review via email: mp+114584@code.launchpad.net

Commit message

Avoid random build failures "_intltool_update-NOTFOUND: not found"
by verifying intltool-update exists. If not, then fail cmake more cleanly
with a nice error message telling the user how to install it.
(LP: #1023742)

The truly weird part is that I've been building compiz successfully for a
long time without intltool-update installed. However we have some broken
cmake dependencies somewhere which *sometimes* make that a problem (like
with make -j2), but mostly not a problem (like make -j1).

Description of the change

Avoid random build failures "_intltool_update-NOTFOUND: not found"
by verifying intltool-update exists. If not, then fail cmake more cleanly
with a nice error message telling the user how to install it.
(LP: #1023742)

The truly weird part is that I've been building compiz successfully for a
long time without intltool-update installed. However we have some broken
cmake dependencies somewhere which *sometimes* make that a problem (like
with make -j2), but mostly not a problem (like make -j1).

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

This is also good, although I'm not sure about the usage of SEND_ERROR here

(See: http://cmake.org/cmake/help/v2.8.8/cmake.html#command:message)

SEND_ERROR will prevent generation but not abort configuration - I think in the case where intltool-update is not found we should just not generate translations and use message (WARNING) for that. If we should enforce the generation of translations, then just put a reason why and mark this branch as approved.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have tested it. If the file doesn't exist then cmake will complete, but says there were errors and won't give you a Makefile. I think that's preferable to aborting cmake immediately. It's still an error and still prevents you from building.

This bug is actually caused by a race of some sort. Because under normal circumstances (make -j1) I can build successfully without intltool* installed.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Okay then.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/CMakeLists.txt'
2--- po/CMakeLists.txt 2012-05-24 00:55:17 +0000
3+++ po/CMakeLists.txt 2012-07-12 07:39:57 +0000
4@@ -1,7 +1,9 @@
5 project (po)
6
7 find_program (_intltool_update intltool-update)
8-mark_as_advanced (intltool_update)
9+if (NOT EXISTS "${_intltool_update}")
10+ message (SEND_ERROR "Missing intltool-update (try: sudo apt-get install intltool)")
11+endif ()
12
13 find_program (_xgettext xgettext)
14 mark_as_advanced (_xgettext)

Subscribers

People subscribed via source and target branches