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 775978 - builder/git: do not enable git plugin by default if libgit2-glib is not installed
builder/git: do not enable git plugin by default if libgit2-glib is not insta...
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
Flatpak Nightly Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-12 11:29 UTC by Felix Schwarz
Modified: 2016-12-12 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
do not enable git plugin by default if libgit2-glib is not installed (2.20 KB, patch)
2016-12-12 11:29 UTC, Felix Schwarz
committed Details | Review

Description Felix Schwarz 2016-12-12 11:29:43 UTC
Created attachment 341811 [details] [review]
do not enable git plugin by default if libgit2-glib is not installed

The configure script tries to build the git plugin by default even when libgit2-glib is not installed at all.

In that case the configure script exits with a somewhat confusing error message

   please recompile a threadsafe version of libgit2 (-DTHREADSAFE:BOOL=ON)

instead of complaining about "libgit2-glib" not being found.


This problem was tackled in bug 764522 but the patch missed the case of "$enabled_git_plugin=auto".

Now the git plugin is built by default only if autotools detects a sufficiently recent version of libgit2-glib.

The only downside I can see is that autotools will now always query "pkg_config" even if the user explicitly disabled the git plugin (e.g. "--enable-git-plugin=no") but I wanted to keep the level of indentation low.
Comment 1 sébastien lafargue 2016-12-12 12:00:59 UTC
Personally i don't care about an extra level of indentation but i also don't have metrics about how long take a pkg_config check, just that Autotools is already as slow as this.

I let Christian decide on this one :)
Comment 2 Christian Hergert 2016-12-12 23:30:15 UTC
Review of attachment 341811 [details] [review]:

Seems reasonable to me.
Comment 3 Christian Hergert 2016-12-12 23:36:48 UTC
Thanks!