Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597068 - Circular dependency between x11-libs/gtk+:2 and x11-themes/gtk-engines-adwaita
Summary: Circular dependency between x11-libs/gtk+:2 and x11-themes/gtk-engines-adwaita
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://dev.gentoo.org/~ulm/pms/head/...
Whiteboard:
Keywords:
: 597262 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-13 17:57 UTC by gentoo@danielquinn.org
Modified: 2016-11-30 11:50 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo@danielquinn.org 2016-10-13 17:57:11 UTC
On a new install, using profile default/linux/amd64/13.0/desktop/gnome/systemd, I try to run the following command and it dies complaining about a circular dependency between gtk+ and gtk-engines-adwaita:


These are the packages that would be merged, in order:

Calculating dependencies  ... done!


[nomerge       ] gnome-base/gnome-shell-3.20.4::gentoo  USE="bluetooth networkmanager nls (-openrc-force)" PYTHON_TARGETS="python3_4 (-python3_3) -python3_5" 
[ebuild  N     ]  gnome-base/gdm-3.20.1::gentoo  USE="branding introspection ipv6 tcpd -accessibility -audit -fprint -plymouth (-selinux) -smartcard {-test} -wayland -xinerama" 1,123 KiB
[ebuild  N     ]  gnome-base/gnome-control-center-3.20.2:2::gentoo  USE="bluetooth colord gnome-online-accounts i18n networkmanager v4l -cups -debug -kerberos -wayland" INPUT_DEVICES="-wacom" 6,938 KiB
[ebuild  N     ]   gnome-extra/nm-applet-1.4.2::gentoo  USE="introspection -modemmanager -teamd" 1,282 KiB
[ebuild  N     ]    virtual/notification-daemon-0::gentoo  USE="gnome" 0 KiB
[ebuild  N     ]     gnome-base/gnome-shell-3.20.4::gentoo  USE="bluetooth networkmanager nls (-openrc-force)" PYTHON_TARGETS="python3_4 (-python3_3) -python3_5" 1,624 KiB
[nomerge       ] gnome-base/gnome-shell-3.20.4::gentoo  USE="bluetooth networkmanager nls (-openrc-force)" PYTHON_TARGETS="python3_4 (-python3_3) -python3_5" 
[nomerge       ]  gnome-base/gnome-session-3.20.2::gentoo  USE="ipv6 systemd -doc" 
[nomerge       ]   gnome-base/gnome-settings-daemon-3.20.2::gentoo  USE="colord networkmanager policykit udev -cups -debug (-openrc-force) -smartcard {-test} -wayland" INPUT_DEVICES="-wacom" 
[nomerge       ]    sci-geosciences/geocode-glib-3.20.1::gentoo  USE="introspection {-test}" 
[nomerge       ]     gnome-base/gvfs-1.28.3-r1::gentoo  USE="cdda fuse gnome-keyring gnome-online-accounts gtk http mtp systemd udev udisks -afp -archive -bluray -google -gphoto2 -ios -nfs -samba {-test} -zeroconf" 
[nomerge       ]      net-libs/gnome-online-accounts-3.20.4:0/1::gentoo  USE="gnome introspection -debug -kerberos" 
[nomerge       ]       gnome-base/gnome-control-center-3.20.2:2::gentoo  USE="bluetooth colord gnome-online-accounts i18n networkmanager v4l -cups -debug -kerberos -wayland" INPUT_DEVICES="-wacom" 
[nomerge       ]        net-misc/networkmanager-1.4.2::gentoo  USE="bluetooth dhclient introspection modemmanager ncurses nss ppp systemd wext wifi -audit -connection-sharing (-consolekit) -gnutls -json -ofono -resolvconf (-selinux) -teamd {-test} -vala" ABI_X86="(64) -32 (-x32)" 
[ebuild  N     ]         net-dialup/ppp-2.4.7-r2:0/2.4.7::gentoo  USE="gtk ipv6 pam -activefilter -atm -dhcp -eap-tls -libressl -radius" 742 KiB
[nomerge       ] gnome-base/gnome-shell-3.20.4::gentoo  USE="bluetooth networkmanager nls (-openrc-force)" PYTHON_TARGETS="python3_4 (-python3_3) -python3_5" 
[nomerge       ]  app-accessibility/caribou-0.4.21::gentoo  PYTHON_TARGETS="python2_7 python3_4 -python3_5" 
[nomerge       ]   x11-libs/gtk+-2.24.31-r1:2::gentoo [3.20.9:3::gentoo] USE="introspection vim-syntax (-aqua) -cups -examples {-test} -xinerama" ABI_X86="(64) -32 (-x32)" 
[ebuild  N     ]    x11-themes/gtk-engines-adwaita-3.20.2::gentoo  ABI_X86="(64) -32 (-x32)" 2,812 KiB
[ebuild  N     ]  app-accessibility/caribou-0.4.21::gentoo  PYTHON_TARGETS="python2_7 python3_4 -python3_5" 417 KiB
[ebuild  N     ]  app-i18n/ibus-1.5.14::gentoo  USE="X gtk gtk3 introspection nls python -deprecated -gconf {-test} -vala -wayland" PYTHON_TARGETS="python2_7" 2,163 KiB
[ebuild  NS    ]   x11-libs/gtk+-2.24.31-r1:2::gentoo [3.20.9:3::gentoo] USE="introspection vim-syntax (-aqua) -cups -examples {-test} -xinerama" ABI_X86="(64) -32 (-x32)" 12,506 KiB
[nomerge       ] gnome-base/gnome-shell-3.20.4::gentoo  USE="bluetooth networkmanager nls (-openrc-force)" PYTHON_TARGETS="python3_4 (-python3_3) -python3_5" 
[nomerge       ]  gnome-extra/evolution-data-server-3.20.5:0/57::gentoo  USE="berkdb gnome-online-accounts gtk introspection ipv6 vala weather -api-doc-extras -google -kerberos -ldap {-test}" 
[nomerge       ]   dev-libs/libgdata-0.17.6:0/22::gentoo  USE="crypt gnome-online-accounts introspection -static-libs {-test} -vala" 
[nomerge       ]    net-libs/gnome-online-accounts-3.20.4:0/1::gentoo  USE="gnome introspection -debug -kerberos" 
[nomerge       ]     net-libs/telepathy-glib-0.24.1::gentoo  USE="introspection vala -debug {-test}" PYTHON_TARGETS="python2_7" 
[ebuild  N     ]      net-im/telepathy-mission-control-5.16.4::gentoo  USE="networkmanager -debug" 1,077 KiB
[ebuild  N     ]  gnome-base/gnome-session-3.20.2::gentoo  USE="ipv6 systemd -doc" 768 KiB
[ebuild  N     ]   gnome-base/gnome-settings-daemon-3.20.2::gentoo  USE="colord networkmanager policykit udev -cups -debug (-openrc-force) -smartcard {-test} -wayland" INPUT_DEVICES="-wacom" 1,583 KiB
[ebuild  N     ]    net-misc/networkmanager-1.4.2::gentoo  USE="bluetooth dhclient introspection modemmanager ncurses nss ppp systemd wext wifi -audit -connection-sharing (-consolekit) -gnutls -json -ofono -resolvconf (-selinux) -teamd {-test} -vala" ABI_X86="(64) -32 (-x32)" 3,671 KiB
[nomerge       ] gnome-base/gnome-control-center-3.20.2:2::gentoo  USE="bluetooth colord gnome-online-accounts i18n networkmanager v4l -cups -debug -kerberos -wayland" INPUT_DEVICES="-wacom" 
[ebuild  N     ]  gnome-extra/gnome-color-manager-3.20.0::gentoo  USE="(-packagekit) -raw {-test}" 2,599 KiB
[ebuild  N     ]  media-video/cheese-3.20.2:0/8::gentoo  USE="introspection {-test}" 1,801 KiB
[nomerge       ] gnome-base/gnome-shell-3.20.4::gentoo  USE="bluetooth networkmanager nls (-openrc-force)" PYTHON_TARGETS="python3_4 (-python3_3) -python3_5" 
[ebuild  N     ]  x11-wm/mutter-3.20.3::gentoo  USE="introspection kms {-test} -wayland" 1,454 KiB
[ebuild  N     ]  net-wireless/gnome-bluetooth-3.20.0:2/13::gentoo  USE="introspection -debug" 776 KiB
[ebuild  N     ]   media-libs/libcanberra-0.30-r5::gentoo  USE="alsa gnome gstreamer gtk gtk3 pulseaudio sound udev -oss -tdb" ABI_X86="(64) -32 (-x32)" 312 KiB

Total: 19 packages (18 new, 1 in new slot), Size of downloads: 43,639 KiB

 * Error: circular dependencies:

(x11-themes/gtk-engines-adwaita-3.20.2:0/0::gentoo, ebuild scheduled for merge) depends on
 (x11-libs/gtk+-2.24.31-r1:2/2::gentoo, ebuild scheduled for merge) (buildtime)
  (x11-themes/gtk-engines-adwaita-3.20.2:0/0::gentoo, ebuild scheduled for merge) (runtime)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.


I've managed to reproduce this with a number of other emerge attempts.  Git for example has the gtk use flag, which pulls in pygtk, libglade, and eventually gtk+ so this pretty much makes installing a GTK-based system impossible so long as I've got ACCEPT_KEYWORDS="~amd64".

As requested, I'm also attaching the output of emerge --info:


Portage 2.3.2 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.23-r2, 4.1.33-std483-amd64 x86_64)
=================================================================
System uname: Linux-4.1.33-std483-amd64-x86_64-Intel-R-_Core-TM-_i7-6900K_CPU_@_3.20GHz-with-gentoo-2.3
KiB Mem:    65882344 total,  63355540 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 13 Oct 2016 07:45:01 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.2::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://athens/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=17 --load-average=16"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://gentoo.imj.fr/pub/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.modulix.net/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ ftp://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j17 -l16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aes alsa amd64 avx avx2 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fma3 fortran fuse gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms libnotify libsecret mad matroska mmx mmxext mng modules mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nls nptl offensive ogg ogm opengl openmp pam pango pcre pdf png policykit popcnt ppds pulseaudio python qt3support readline sdl seccomp session spell sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vim-syntax vorbis vpx x264 x265 xattr xcb xml xpm xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" KERNEL="linux" L10N="en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


I'm not really all that familiar with gtk stuff, but I should probably mention that x11-libs/gtk+ was already installed at version 3.20.9.  For some reason, installing much of anything else tries to pull in gtk-engines-adwaita-3.20.2, and *that* package seems to want gtk+-2.24.31-r1... I'm not sure what's going on now.

I posted this to the mailing list and was redirected here.  I'm happy to help debug against my machine if need be.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2016-10-15 09:30:21 UTC
So this seems to be the result of work in bug #569552. In your case some libraries are pulling gtk+:2 which pulls the engine which is perfectly normal with current USE="gtk gtk3" situation.

We checked that package manager is supposed to be able to postpone building a pure RDEPEND to solve circular dependencies per PMS (8.1 Dependency Classes) but apparently this is not the case here.

Could this be a bug in portage or is it a bad comprehension of the PMS ?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-10-15 17:51:17 UTC
Don't rely on crazy behavior like that. Just move adwaita to PDEPEND since it's not strictly required.
Comment 3 Zac Medico gentoo-dev 2016-10-15 19:17:53 UTC
(In reply to Gilles Dartiguelongue from comment #1)
> We checked that package manager is supposed to be able to postpone building
> a pure RDEPEND to solve circular dependencies per PMS (8.1 Dependency
> Classes) but apparently this is not the case here.
> 
> Could this be a bug in portage or is it a bad comprehension of the PMS ?

It has to a pure runtime cycle for that to work, therefore it doesn't work because gtk-engines-adwaita has a build-time dependency on gtk+.
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2016-10-16 09:36:41 UTC
Ok that's more precise. I'll fix the ebuild. Could this precision be added to PMS as well ?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-10-16 11:16:39 UTC
I'd rather ban the cycles completely and require people to use PDEPEND. This is safer, more portable and more predictable.
Comment 6 Mart Raudsepp gentoo-dev 2016-10-16 13:40:51 UTC
I suggested Gilles to try with a pure RDEPEND because that's what it is conceptually and years ago we were told to use that and only use PDEPEND for some sort of exceptional cases. I guess some case didn't get tested fully.
Would be nice if these things were clear then in devmanual or other places (maybe they are and we didn't find it).
The information I knew was to use pure RDEPEND as RDEPEND and avoid PDEPEND if at all possible, now we are told different again, it seems.
Comment 7 Ulrich Müller gentoo-dev 2016-10-16 17:41:59 UTC
(In reply to Mart Raudsepp from comment #6)
> I suggested Gilles to try with a pure RDEPEND because that's what it is
> conceptually and years ago we were told to use that and only use PDEPEND for
> some sort of exceptional cases. I guess some case didn't get tested fully.
> Would be nice if these things were clear then in devmanual or other places
> (maybe they are and we didn't find it).
> The information I knew was to use pure RDEPEND as RDEPEND and avoid PDEPEND
> if at all possible, now we are told different again, it seems.

If the cycle is:
   A --(RDEPEND)--> B --(RDEPEND)--> A
then the package manager can break it.

However, for
   A --(DEPEND,RDEPEND)--> B --(RDEPEND)--> A
breaking of the cycle is not possible, because B is considered usable only if its runtime dependencies are installed (see second bullet point in https://projects.gentoo.org/pms/6/pms.html#x1-750008.1).

Here the cycle is of the second type, with package A being gtk-engines-adwaita and package B being gtk+:2.
Comment 8 Gilles Dartiguelongue (RETIRED) gentoo-dev 2016-10-16 22:25:54 UTC
Fixed gtk+ dependency in https://cgit.gentoo.org/repo/gentoo.git/commit/?id=437f158a07bc43c67d31b18f11aecccd706d31ef. Should I leave this open so we work on a clearer text for PMS ?
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2016-10-16 22:40:01 UTC
*** Bug 597262 has been marked as a duplicate of this bug. ***
Comment 10 Ulrich Müller gentoo-dev 2016-10-17 06:57:34 UTC
(In reply to Gilles Dartiguelongue from comment #8)
> Should I leave this open so we work on a clearer text for PMS ?

I'd rather suggest to leave PMS alone, but add a section about circular dependencies to the dependencies chapter of the devmanual:
https://devmanual.gentoo.org/general-concepts/dependencies/index.html

Presumably it would be cleaner to open a new bug for this, though.