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 690281 - do not add unused gnome dependencies to libgdata.pc when configured with --disable-gnome
do not add unused gnome dependencies to libgdata.pc when configured with --di...
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: libgdata-maint
libgdata-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-16 05:29 UTC by Alexandre Rostovtsev
Modified: 2012-12-16 18:49 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
proposed patch (1.53 KB, patch)
2012-12-16 05:43 UTC, Alexandre Rostovtsev
accepted-commit_now Details | Review

Description Alexandre Rostovtsev 2012-12-16 05:29:53 UTC
When libgdata (current git master) is configured with --disable-gnome, it still adds GNOME_PACKAGES dependencies to libgdata.pc's Requires.private, even though these dependencies are neither checked for nor linked to:

# cat /usr/lib/pkgconfig/libgdata.pc 
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

Name: libgdata
Description: GData client library
Version: 0.13.2
Requires: gobject-2.0 glib-2.0 >= 2.31.0 gio-2.0 >= 2.17.3 libxml-2.0 libsoup-2.4 >= 2.37.91 
Requires.private: gthread-2.0 oauth >= 0.9.4 libsoup-gnome-2.4 gcr-base-3 libxml-2.0 goa-1.0 >= 3.2
Libs: -L${libdir} -lgdata
Cflags: -I${includedir}/libgdata


The resulting libgdata.pc file is invalid when installed on a system that does not have goa or libsoup-gnome installed:

# pkg-config --exists --print-errors libgdata
Package goa-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `goa-1.0.pc' to the PKG_CONFIG_PATH environment variable
Package 'goa-1.0', required by 'libgdata', not found
Comment 1 Alexandre Rostovtsev 2012-12-16 05:43:22 UTC
Created attachment 231639 [details] [review]
proposed patch
Comment 2 Philip Withnall 2012-12-16 15:33:36 UTC
Review of attachment 231639 [details] [review]:

Looks good to me. Please commit to master with the minor fix below. Thanks!

::: configure.ac
@@ +95,3 @@
+	GNOME_PACKAGES_PUBLIC=""
+	GNOME_PACKAGES_PRIVATE="libsoup-gnome-2.4 gcr-base-3 libxml-2.0 goa-1.0 >= $GOA_REQS"
+	GNOME_PACKAGES="$GNOME_PACKAGES_PUBLIC $GNOME_PACKAGES_PRIVATE"

You could move the definition of GNOME_PACKAGES out of the conditional to just before the AC_SUBSTs to save a duplicated line.
Comment 3 Alexandre Rostovtsev 2012-12-16 17:03:15 UTC
(In reply to comment #2)
> You could move the definition of GNOME_PACKAGES out of the conditional to just
> before the AC_SUBSTs to save a duplicated line.

Can't do that, it's used inside the conditional:
	PKG_CHECK_MODULES([GNOME], [$GNOME_PACKAGES])
Comment 4 Philip Withnall 2012-12-16 18:28:10 UTC
(In reply to comment #3)
> Can't do that, it's used inside the conditional:
>     PKG_CHECK_MODULES([GNOME], [$GNOME_PACKAGES])

Whoops, missed that. Please commit the patch unmodified then. Thanks.
Comment 5 Alexandre Rostovtsev 2012-12-16 18:49:42 UTC
Thanks, committed: http://git.gnome.org/browse/libgdata/commit/?id=60230e288e465091380135ed2d2397cce7ae956c