Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 371290 - gnome-base/librsvg-2.34.0 has an automagic dependency on gtk+:3
Summary: gnome-base/librsvg-2.34.0 has an automagic dependency on gtk+:3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-12 18:25 UTC by Michał Górny
Modified: 2011-11-20 16:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
1.patch (1.patch,1.19 KB, patch)
2011-06-22 11:55 UTC, Pacho Ramos
Details | Diff
1.patch (1.patch,1.38 KB, patch)
2011-06-23 13:30 UTC, Pacho Ramos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-12 18:25:45 UTC
After removing gtk+:3:

!!! existing preserved libs:
>>> package: x11-libs/gtk+-3.0.10
 *  - /usr/lib64/libgdk-3.so
 *  - /usr/lib64/libgdk-3.so.0
 *  - /usr/lib64/libgdk-3.so.0.0.10
 *      used by /usr/bin/rsvg-view-3 (gnome-base/librsvg-2.34.0)
 *  - /usr/lib64/libgtk-3.so
 *  - /usr/lib64/libgtk-3.so.0
 *  - /usr/lib64/libgtk-3.so.0.0.10
 *      used by /usr/bin/rsvg-view-3 (gnome-base/librsvg-2.34.0)
Comment 1 Pacho Ramos gentoo-dev 2011-06-19 11:03:14 UTC
I would report this to upstream also
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-19 11:10:08 UTC
Feel free to :D.
Comment 3 Pacho Ramos gentoo-dev 2011-06-19 12:45:43 UTC
I am unsure about if we should try to have a "--enable/disable-gtk{2,3}" or simply build both :-/ (looks like there are no many packages with a "gtk3" USE flag)

the offending code looks to be at:

dnl ===========================================================================
dnl GTK theme engine
dnl ===========================================================================

AC_MSG_CHECKING([whether to build the GTK+ theme engine])
AC_ARG_ENABLE([gtk-theme],
  [AS_HELP_STRING([--disable-gtk-theme],[Disable a RSVG based GTK+ theme engine (default=yes)])],
  [],[enable_gtk_theme=yes])
AC_MSG_RESULT([$enable_gtk_theme])

have_gtk_2=no
have_gtk_3=no
GTK2_BINARY_VERSION=
GTK3_BINARY_VERSION=

if test "x$enable_gtk_theme" = "xyes" -o "x$enable_pixbuf_loader" = "xyes"; then
  PKG_CHECK_MODULES([GTK2],[gtk+-2.0 >= $GTK2_REQUIRED],[have_gtk_2=yes],[have_gtk_2=no])
  PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no])

  if test "$have_gtk_2" = "yes"; then
     GTK2_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`"
  fi
  if test "$have_gtk_3" = "yes"; then
     GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
  fi
fi

AC_SUBST([GTK2_BINARY_VERSION])
AC_SUBST([GTK3_BINARY_VERSION])

AM_CONDITIONAL([ENABLE_GTK_ENGINE],[test "$enable_gtk_theme" = "yes"])
AM_CONDITIONAL([HAVE_GTK_2],[test "$have_gtk_2" = "yes"])
AM_CONDITIONAL([HAVE_GTK_3],[test "$have_gtk_3" = "yes"])
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-06-21 11:50:58 UTC
Yeah I told nirbheek this caused automagic dependency when he commited this ebuid by mistake. We should make we have the loader for gtk3 when gtk3 is installed and same for gtk2.

* Slotting is possible, maybe not the best
* Could have use flag is slotting doesn't work or isn't approved
* Forcing the build of both is not ideal and I wouldn't be in favor of it at all
Comment 5 Pacho Ramos gentoo-dev 2011-06-22 09:07:02 UTC
(In reply to comment #4)
> Yeah I told nirbheek this caused automagic dependency when he commited this
> ebuid by mistake. 

Should librsvg-2.34.0 be skipped from stabilization in bug 369909 due this problem then? (even gtk+-3 not being stable yet...)
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-06-22 11:32:12 UTC
That would be preferable to avoid dealing with this in stable for now.
Comment 7 Pacho Ramos gentoo-dev 2011-06-22 11:55:32 UTC
Created attachment 277757 [details, diff]
1.patch

This patch looks to fix this for me, but we need to decide how to handle this now (slotting -> in that case how to handle with colliding files), or a gtk3 USE flag...
Comment 8 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-06-22 15:00:49 UTC
In the USE flag case:
that patch would be fine if it allowed both to be compiled at the same time :p
if you don't want to change the patch though, maybe having the ebuild do out-of-tree build like I did for gtk-vnc would do it for us.

In the slotting case:
that patch is fine, we just do a r1 and block older release in slotted revisions just like I did for libwpd and libwps (iirc)
Comment 9 Pacho Ramos gentoo-dev 2011-06-22 15:41:16 UTC
Maybe both could be support with --with-gtk=all, as most setups will have gtk+2 and 3 at the same time in the near future
Comment 10 Pacho Ramos gentoo-dev 2011-06-23 13:30:04 UTC
Created attachment 277877 [details, diff]
1.patch

Updated patch with "all" option, the configure invocation would be as follows:

pkg_setup() {
        # croco is forced on to respect SVG specification
        G2CONF="${G2CONF}
                --disable-static
                $(use_enable tools)
                $(use_enable gtk gtk-theme)
                --with-croco
                --enable-pixbuf-loader"
        use gtk && ! use gtk3 && G2CONF+=" --with-gtk=2.0"
        use gtk && use gtk3 && G2CONF+=" --with-gtk=all"
        ! use gtk && use gtk3 && G2CONF+=" --with-gtk=3.0 --enable-gtk-theme"
        DOCS="AUTHORS ChangeLog README NEWS TODO"
}

But please review this as I am also thinking in other things related with real life now and I am not 100% sure this is the simplest way to handle this
Comment 11 Pacho Ramos gentoo-dev 2011-06-23 13:34:55 UTC
I am also unsure about:

pkg_postinst() {
        gdk-pixbuf-query-loaders > "${EROOT}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
}

pkg_postrm() {
        gdk-pixbuf-query-loaders > "${EROOT}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
}


As it would probably require some addition for gtk3 :S
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-06-23 14:30:59 UTC
so you want USE flag solution ?
Comment 13 Pacho Ramos gentoo-dev 2011-06-23 16:21:13 UTC
(In reply to comment #12)
> so you want USE flag solution ?

Yes, I would prefer it as the difference between building it with gtk3 support or not is only for gtk-theme, the rest of files are common
Comment 14 Pacho Ramos gentoo-dev 2011-06-26 10:04:44 UTC
As I have seen in other third party projects, "both" is used instead of "all" for building with support for both gtk+ versions, maybe we could use that one (and apply the patch for releasing a librsvg for gtk+2 to go to stable and another one with support for all combinations for "testing")
Comment 15 Pacho Ramos gentoo-dev 2011-06-26 16:43:59 UTC
+  26 Jun 2011; Pacho Ramos <pacho@gentoo.org> -librsvg-2.26.3.ebuild,
+  librsvg-2.34.0.ebuild, +librsvg-2.34.0-r1.ebuild,
+  +files/librsvg-2.34.0-automagic-gtk.patch:
+  Fix automagic gtk+ dependency (bug #371290 by Michał Górny), remove old.
+

Will keep this opened as probably Gilles wants to handle this in a bit different way (but this allows us to unblock bug 369909)
Comment 16 Jonathan Callen (RETIRED) gentoo-dev 2011-07-01 04:46:01 UTC
(In reply to comment #11)
> I am also unsure about:
> 
> pkg_postinst() {
>         gdk-pixbuf-query-loaders >
> "${EROOT}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
> }
> 
> pkg_postrm() {
>         gdk-pixbuf-query-loaders >
> "${EROOT}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
> }
> 
> 
> As it would probably require some addition for gtk3 :S

There is only one gdk-pixbuf, and both gtk2 and gtk3 link against it (in fact, gtk3 is the reason it was split from gtk2).
Comment 17 Pacho Ramos gentoo-dev 2011-09-09 20:03:16 UTC
Are we ok with this solution then?
Comment 18 Pacho Ramos gentoo-dev 2011-09-26 13:04:46 UTC
Will close this in a week if nobody disagrees
Comment 19 Pacho Ramos gentoo-dev 2011-11-20 16:02:48 UTC
(In reply to comment #18)
> Will close this in a week if nobody disagrees