Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175808 (circular-deps) - emerge should intelligently solve circular dependencies triggered by flags such as USE="doc"
Summary: emerge should intelligently solve circular dependencies triggered by flags su...
Status: CONFIRMED
Alias: circular-deps
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: AMD64 Linux
: High minor with 18 votes (vote)
Assignee: Portage team
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
: 32394 152405 152576 174078 178237 183240 190351 190671 192714 193861 216601 239973 268805 277981 303138 303959 304377 307295 309969 336884 361189 424801 749342 (view as bug list)
Depends on:
Blocks: 155723 300071 417675 261855
  Show dependency tree
 
Reported: 2007-04-24 08:09 UTC by Frossie
Modified: 2024-03-04 21:17 UTC (History)
46 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 Frossie 2007-04-24 08:09:01 UTC
Hope I am not being an idiot here... I have a new laptop that I am putting gentoo on (amd64 on Intel Core 2 Duo) using the same USE flags that I have on my (genuine AMD) amd64 desktop.

The basic install goes well, until I emerge kde (though I can reproduce this with cups alone etc) where I get a whole host of circular dependencies. Removing the -doc flag seems to cure the problem:

# emerge -pv cups

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

Calculating dependencies... done!
[nomerge      ] x11-libs/qt-3.3.8-r2  USE="cups doc gif ipv6 opengl -debug -examples (-firebird) -immqt -immqt-bc -mysql -nas -nis -odbc -postgres -sqlite -xinerama"
[nomerge      ]  net-print/cups-1.2.10  USE="X dbus jpeg ldap nls pam png ppds ssl tiff -php -samba -slp"
[nomerge      ]   sys-apps/dbus-1.0.2-r2  USE="X doc -debug (-selinux)"
[nomerge      ]    app-doc/doxygen-1.5.2  USE="doc qt3 -tetex"
[ebuild  N    ]     media-gfx/graphviz-2.12  USE="X doc gtk nls perl python -examples -gnome -pango -ruby -tcl -tk"
[ebuild  N    ]      dev-lang/swig-1.3.31  USE="doc java perl python -guile -lua -mono -ocaml -php -pike -ruby -tcl -tk"
[ebuild  N    ]       virtual/jdk-1.6.0
[ebuild  N    ]        dev-java/sun-jdk-1.6.0-r2  USE="X alsa doc -examples -jce (-nsplugin)"
[ebuild  N    ]         media-libs/alsa-lib-1.0.14_rc3  USE="doc -debug"
[ebuild  N    ]   sys-apps/dbus-1.0.2-r2  USE="X doc -debug (-selinux)"
[ebuild  N    ]    app-doc/doxygen-1.5.2  USE="doc qt3 -tetex"
[ebuild  N    ]     x11-libs/qt-3.3.8-r2  USE="cups doc gif ipv6 opengl -debug -examples (-firebird) -immqt -immqt-bc -mysql -nas -nis -odbc -postgres -sqlite -xinerama"
[ebuild  N    ]     virtual/ghostscript-0
[ebuild  N    ]      app-text/ghostscript-gpl-8.54  USE="X cups gtk -cjk -djvu -emacs -jpeg2k"
[ebuild  N    ]       net-print/cups-1.2.10  USE="X dbus jpeg ldap nls pam png ppds ssl tiff -php -samba -slp"
!!! Error: circular dependencies:

('ebuild', '/', 'media-gfx/graphviz-2.12', 'merge') depends on
   ('ebuild', '/', 'dev-lang/swig-1.3.31', 'merge') (hard)
('ebuild', '/', 'virtual/jdk-1.6.0', 'merge') depends on
   ('ebuild', '/', 'dev-java/sun-jdk-1.6.0-r2', 'merge') (medium)
('ebuild', '/', 'x11-libs/qt-3.3.8-r2', 'merge') depends on
   ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') (hard)
('ebuild', '/', 'virtual/ghostscript-0', 'merge') depends on
   ('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge') (medium)
   ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') (soft)
('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge') depends on
   ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') (hard)
('ebuild', '/', 'dev-java/sun-jdk-1.6.0-r2', 'merge') depends on
   ('ebuild', '/', 'media-libs/alsa-lib-1.0.14_rc3', 'merge') (medium)
('ebuild', '/', 'dev-lang/swig-1.3.31', 'merge') depends on
   ('ebuild', '/', 'dev-java/sun-jdk-1.6.0-r2', 'merge') (hard)
   ('ebuild', '/', 'virtual/jdk-1.6.0', 'merge') (hard)
('ebuild', '/', 'sys-apps/dbus-1.0.2-r2', 'merge') depends on
   ('ebuild', '/', 'app-doc/doxygen-1.5.2', 'merge') (hard)
('ebuild', '/', 'app-doc/doxygen-1.5.2', 'merge') depends on
   ('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge') (hard)
   ('ebuild', '/', 'x11-libs/qt-3.3.8-r2', 'merge') (hard)
   ('ebuild', '/', 'virtual/ghostscript-0', 'merge') (hard)
   ('ebuild', '/', 'media-gfx/graphviz-2.12', 'merge') (hard)
('ebuild', '/', 'net-print/cups-1.2.10', 'merge') depends on
   ('ebuild', '/', 'sys-apps/dbus-1.0.2-r2', 'merge') (hard)
('ebuild', '/', 'media-libs/alsa-lib-1.0.14_rc3', 'merge') depends on
   ('ebuild', '/', 'app-doc/doxygen-1.5.2', 'merge') (hard)

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

Running 

# USE="-doc" emerge -pv cups

does not show the error. Confusingly, the AMD box I copied the USE flags from does not have the problem, so I am not sure how to suggest reproducing this.

Anyway if anybody is seeing this, just drop the -doc flag. 

Reproducible: Always
Comment 1 Frossie 2007-04-24 08:12:17 UTC
(after removing doc flag)

# emerge --info
Portage 2.1.2.4 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.20-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.20-gentoo-r6 x86_64 Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Tue, 24 Apr 2007 08:00:01 +0000
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ "
LINGUAS="en fr el"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 arts berkdb bitmap-fonts bluetooth browserplugin cairo cddb cdparanoia cdr cli cracklib crypt cups dbus dri dvd dvdr eds emboss encode esd exif fam firefox flac fontconfig fortran gd gdbm gif gpm gstreamer gtk gtk2 hal http iconv ieee1394 ipv6 isdnlog jabber java jikes jpeg kde ldap libg++ mad midi mikmod mozbranding mp3 mpeg mule ncurses nls nptl nptlonly nsplugin obex ogg opengl oss pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts udb unicode usb verbose vorbis xine xml xml2 xorg xpm xv yaz zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr el" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 2 solar (RETIRED) gentoo-dev 2007-04-24 14:41:46 UTC
Not sure who to assign this one so adding the maintainers of the listed pkgs 
in this to the CC: printing@gentoo.org,nerdboy@gentoo.org,gentopia@gentoo.org
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2007-04-25 00:43:42 UTC
What exactly do you want me to do? Those are the depends to build the D-Bus docs. Take any of those depends out and D-Bus will not compile successfully when you try to build the docs.
Comment 4 Matthias Schwarzott gentoo-dev 2007-04-27 12:26:48 UTC
@Cardoe:
you could split dbus into two packages: dbus and dbus-docs. Where dbus ebuild contains:
RDEPEND="doc? ( dbus-docs )"
Comment 5 Bo Ørsted Andresen (RETIRED) gentoo-dev 2007-04-27 12:47:38 UTC
(The current summary seems to be saying that there are circular deps with doc *disabled* which is obviously wrong.) :p

(In reply to comment #4)
> you could split dbus into two packages: dbus and dbus-docs. Where dbus ebuild
> contains:
> RDEPEND="doc? ( dbus-docs )"

How is that going to help? You still need to disable doc to break the cycle. RDEPEND is a hard dependency with the current resolver.

The only thing that would help is if some of those deps could be moved to PDEPEND which would let portage build the package when it's PDEPENDs aren't satisfied yet. But if they are build time deps it would still fail.. Just not up front.. I suppose PDEPEND="doc? ( dbus-docs )" might work..
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-05-01 20:29:28 UTC
bug wranglers don't want this... And no, RDEPEND won't work. :) Pretty much CANTFIX unless you can move this to PDEPEND until portage handles it properly.
Comment 7 Frossie 2007-05-01 21:36:40 UTC
Ahem. I now have doubt in my mind - I may have not emerged world after the stage 3 install but prior to start adding packages.

Assuming nobody can reproduce this (can they?) I suggest we close this, and if somebody else gets it they can reopen it. I can't reproduce this on an up-to-date system.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-05-13 05:09:36 UTC
*** Bug 178237 has been marked as a duplicate of this bug. ***
Comment 9 Craig Goodrich 2007-06-20 02:03:18 UTC
Also on x86.  It may be "minor" in severity, but it will blow up any install of Gnome, samba, or cups.  These are not obscure special-interest packages, and selecting extra documentation is a reasonable thing to do for a developer (or an eager newbie).  I've been running Linux since 1994 and I was ready to abandon Gentoo altogether in frustration.

As to up-to-date system, I ran into this today on a 2007.0 fresh install (which blew up from the CD) and a fresh emerge --sync.  If the problem really doesn't occur with a fresh system, perhaps it's time to release a 2007.1 CD.

Fix it.
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-20 14:48:14 UTC
This is not the only such circular dep caused by USE=doc.  Many (most?) packages have it.  Honestly, I've looked at it, and there's no way to solve it that I can see, short of not allowing docs to be installed at all.  What would you propose to fix it?  We cannot maintain a separate docs package for every package in the tree; that's *way* too much work.  All we can do at this point is document it and have people do a two-pass install.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-06-26 12:19:58 UTC
*** Bug 183240 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-06-26 12:46:28 UTC
(In reply to comment #9)
> Fix it.

Eh; the only real solution to this is to fix portage so that it can disable use flags temporarily to work around circular dependencies and later on rebuild the affected packages with original requested use flags. As such, there's no point in assigning similar type bugs wrt USE=doc to maintainers or even filing more bugs about this. This is not an ebuild bug at all, the ebuilds merely state the required dependencies, they won't build otherwise.

The only advise to users is to disable USE=doc on initial install, otherwise they are bound to hit this issue.

Either re-assign this to portage folks (all portage bugs about circular dependencies handling have been closed AFAICS), or close this as CANTFIX.
Comment 13 Craig Goodrich 2007-06-27 22:25:50 UTC
(In reply to comment #12)
 
> The only advise to users is to disable USE=doc on initial install, otherwise
> they are bound to hit this issue.

Precisely.  At the very least, do NOT allow "docs" to be selected in the install wizard GUI.  Note that there is no warning about this, specifically, IIRC.

A near-term workaround might be to determine where the core source of most of the circularity arises (ghostscript? doxygen? qt? all of the above?) and create a special-purpose ebuild-meta which downloads and builds these packages with flags set to avoid the problem.  Note that some packages are more likely than others to be requested with extensive extra docs -- qt and cups, in particular, are sufficiently large, complex, and central to development/administration that extra-doc builds are probable.
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-06-27 22:29:51 UTC
(In reply to comment #13)
> A near-term workaround might be to determine where the core source of most of
> the circularity arises (ghostscript? doxygen? qt? all of the above?) and create
> a special-purpose ebuild-meta which downloads and builds these packages with
> flags set to avoid the problem.

Nope; please re-read Comment #10; we don't have time to maintain such hacks in the tree. Fixing the package manager is the only solution to this.

Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-07-03 08:32:08 UTC
Sending to docs team so that this can be documented in handbook/somewhere else if they wish.
Comment 16 nm (RETIRED) gentoo-dev 2007-07-03 08:50:14 UTC
Nah. We don't recommend installing stuff with +doc anyway.
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2007-07-08 14:58:17 UTC
*** Bug 152576 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 18:23:57 UTC
*** Bug 152405 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 18:25:25 UTC
*** Bug 32394 has been marked as a duplicate of this bug. ***
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2007-08-27 03:31:46 UTC
*** Bug 190351 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2007-08-29 17:41:35 UTC
*** Bug 190671 has been marked as a duplicate of this bug. ***
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2007-09-16 18:23:22 UTC
*** Bug 192714 has been marked as a duplicate of this bug. ***
Comment 23 Jakub Moc (RETIRED) gentoo-dev 2007-09-26 11:10:20 UTC
*** Bug 193861 has been marked as a duplicate of this bug. ***
Comment 24 Craig Goodrich 2007-11-25 21:18:11 UTC
OK, from the number of duplicates it's obvious that this is a widespread problem.  From #10, #12, #14, and #16 it appears that nobody at Gentoo is particularly eager to do anything about it, but everybody would much rather sweep it under the rug by simply closing it with some "go away, don't bother me kid" status.

Fine.  Got it.
Comment 25 Zac Medico gentoo-dev 2007-11-25 21:48:50 UTC
(In reply to comment #24)
> OK, from the number of duplicates it's obvious that this is a widespread
> problem.  From #10, #12, #14, and #16 it appears that nobody at Gentoo is
> particularly eager to do anything about it

The bug is assigned to dev-portage now and we're working on fixing it. Please be patient.
Comment 26 Doug Goldstein (RETIRED) gentoo-dev 2007-11-26 14:22:10 UTC
(In reply to comment #24)
> OK, from the number of duplicates it's obvious that this is a widespread
> problem.  From #10, #12, #14, and #16 it appears that nobody at Gentoo is
> particularly eager to do anything about it, but everybody would much rather
> sweep it under the rug by simply closing it with some "go away, don't bother me
> kid" status.
> 
> Fine.  Got it.
> 

Portage is open source. Feel free do download the code yourself and write the necessary code to fix this. That's how open source works. Additionally, no Gentoo developer is paid to maintain any of this software and you didn't pay a dime for this software, so expecting someone to go out of their way to put in features or fix an issue you are having is preposterous. You either must have patience or contribute to open source. There is only one guaranteed way to have open source do what you want it to do, and that's write it yourself.
Comment 27 DEMAINE Benoît-Pierre, aka DoubleHP 2007-11-26 17:25:30 UTC
(In reply to comment #26)
> Portage is open source. Feel free do download the code yourself and write the
> necessary code to fix this. That's how open source works.

The few times I did that, and attach the patch to the bug, it has never been merged to portage, nor added to foobar/files directory. I am no longer motivated to ever write code again.
Comment 28 Doug Goldstein (RETIRED) gentoo-dev 2007-11-26 17:33:06 UTC
(In reply to comment #27)
> (In reply to comment #26)
> > Portage is open source. Feel free do download the code yourself and write the
> > necessary code to fix this. That's how open source works.
> 
> The few times I did that, and attach the patch to the bug, it has never been
> merged to portage, nor added to foobar/files directory. I am no longer
> motivated to ever write code again.
> 

Well then don't expect others to write the code for you out of the goodness of their hearts.
Comment 29 DEMAINE Benoît-Pierre, aka DoubleHP 2007-11-26 17:50:31 UTC
I don't.
Comment 30 Jakub Moc (RETIRED) gentoo-dev 2008-02-05 23:11:08 UTC
*** Bug 174078 has been marked as a duplicate of this bug. ***
Comment 31 Carsten Lohrke (RETIRED) gentoo-dev 2008-04-06 20:08:27 UTC
*** Bug 216601 has been marked as a duplicate of this bug. ***
Comment 32 Josh Lucy 2008-04-12 16:42:55 UTC
Hey guys, I'm having the same thing go on with anything I try to emerge. I'm installing a new system and I can't install GTK QT GNOME KDE, or anything important to what I do with this system. I'm no developer, but is there anything I can do that doesn't involve unsetting each of my 100 use flags?
Comment 33 Josh Lucy 2008-04-12 16:45:15 UTC
I also just thought of something -- what allowed portage to work before whatever update was done? Maybe removing this 'feature' will allow everyone to emerge their packages again?
Comment 34 Zac Medico gentoo-dev 2008-04-12 21:41:09 UTC
(In reply to comment #33)
> I also just thought of something -- what allowed portage to work before
> whatever update was done? Maybe removing this 'feature' will allow everyone to
> emerge their packages again?

Older versions of portage dropped dependencies and that often led to seemingly random build failures. We don't want users to be filing lots of bugs for things that break because of it.

For now, the recommended workaround is to temporarily disable flags in make.conf or package.use in order to break dependency cycles. For example, temporarily adding USE="-cups -doc -samba" to make.conf should break some of the most common known dependency cycles.

After you've broken the dependency cycles and installed your system, you can revert the USE settings in make.conf and then run `emerge --newuse --deep world` to rebuild everything with your desired flags.
Comment 35 Rohit Kumbhar 2008-07-28 03:48:38 UTC
I got this on 2008.0 too.

USE="-cups -doc -samba" emerge gnome 
would get rid of the errors and start building.
Comment 36 Wilson M. Michaels 2008-09-09 15:35:01 UTC
I also got this on 2008.0.

Removing "doc" and "emacs" from my large USE="..." list   
got rid of the circular dependency errors.

Maybe someone clever could write a script to figure out which USE flags
cause the circular dependency and suggest how to run it when portage 
detects a circular dependency.
Comment 37 Brett Kuyper 2008-09-19 13:01:58 UTC
(In reply to comment #36)
> I also got this on 2008.0.
> 
> Removing "doc" and "emacs" from my large USE="..." list   
> got rid of the circular dependency errors.
> 
> Maybe someone clever could write a script to figure out which USE flags
> cause the circular dependency and suggest how to run it when portage 
> detects a circular dependency.
> 

I have also got this on 2008.0 trying to emerge any gui system for my computer.
Comment 38 Zac Medico gentoo-dev 2008-09-19 17:23:06 UTC
(In reply to comment #37)
> I have also got this on 2008.0 trying to emerge any gui system for my computer.

In general, please refrain from "me too" comments on bugs. This is a well known problem.

Until it's properly fixed, the recommended workaround is to temporarily disable some USE flags in /etc/make.conf and/or /etc/portage/package.use. For example, you should disable the "doc" flag for circular dependencies involving packages that are used to build documentation. Similarly, you should disable the "samba" and "cups" USE flags for circular dependencies involving the net-fs/samba and net-print/cups, respectively.

If you're still have trouble resolving circular dependencies, you might also try reading the forum thread that's linked from this bug:

http://forums.gentoo.org/viewtopic-t-539520-postdays-0-postorder-asc-start-0.html
Comment 39 Zac Medico gentoo-dev 2008-10-05 15:19:17 UTC
*** Bug 239973 has been marked as a duplicate of this bug. ***
Comment 40 Matthew Gregory Sr. 2008-10-16 17:35:23 UTC
I believe I have a workable solution to this problem, but I need to do a test case and provide resource requirements.

I am now working on this bug and will provide updates.
Comment 41 Zac Medico gentoo-dev 2009-07-13 07:32:46 UTC
I think the easiest way to solve this is as follows:

1) Store USE conditional information inside the digraph, as an attribute of the priority object that is stored for each edge.

2) When a cycle is encountered, remove conditional edges as necessary to break the cycle. Take care not to break USE dependencies when doing this.

3) Create a new dependency graph, to plan rebuild of packages which had their USE changed in step (2). There may still be cycles, so this step may have to be repeated any number of times. We can make it bail out if the number of graphs exceeds 10 or so, since that probably means something is wrong.

4) Schedule the series of dependency graphs created above, one after another.
Comment 42 Sebastian Luther (few) 2009-07-15 19:49:02 UTC
*** Bug 277981 has been marked as a duplicate of this bug. ***
Comment 43 David J Cozatt 2009-09-24 00:25:58 UTC
docs flag set somewhere leads to circular dependencies and breaks portage

 david #  emerge -NuvDp  world

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

Calculating dependencies... done!


[nomerge      ] gnome-base/gnome-2.24.1 
[nomerge      ]  gnome-base/gnome-applets-2.24.3.1 
[nomerge      ]   gnome-extra/gucharmap-2.24.3 
[nomerge      ]    dev-python/pygtk-2.14.1-r1 
[nomerge      ]     dev-python/pycairo-1.8.8 [1.8.2] USE="doc%* -svg%" 
[nomerge      ]      dev-python/sphinx-0.6.1-r1  USE="doc -test" 
[ebuild  N    ]       dev-python/jinja2-2.1.1  USE="doc -examples -i18n -test" 
[ebuild  N    ]        dev-python/sphinx-0.6.1-r1  USE="doc -test" 

 * Error: circular dependencies:

('ebuild', '/', 'dev-python/sphinx-0.6.1-r1', 'merge') depends on
  ('ebuild', '/', 'dev-python/jinja2-2.1.1', 'merge') (buildtime)
('ebuild', '/', 'dev-python/jinja2-2.1.1', 'merge') depends on
  ('ebuild', '/', 'dev-python/sphinx-0.6.1-r1', 'merge') (buildtime)

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

Defeated by-

david # USE="-doc examples truetype" emerge -uvDp  dev-python/sphinx

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

Calculating dependencies... done!
[ebuild  N    ] dev-python/jinja2-2.1.1  USE="examples -doc -i18n -test" 505 kB
[ebuild  N    ] dev-python/pygments-1.0  USE="-doc -test" 909 kB
[ebuild  N    ] dev-python/sphinx-0.6.1-r1  USE="-doc -test" 0 kB
[ebuild     U ] dev-lang/tcl-8.5.7 [8.4.18] USE="threads -debug" 4,319 kB
[ebuild     U ] dev-lang/tk-8.5.7 [8.4.18-r1] USE="threads truetype%* -debug" 3,692 kB

Total: 5 packages (2 upgrades, 3 new), Size of downloads: 9,423 kB
Comment 44 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-29 16:49:18 UTC
*** Bug 268805 has been marked as a duplicate of this bug. ***
Comment 45 Erik 2009-12-13 08:58:36 UTC
I also have a new laptop that I am putting Gentoo on (amd64 on Intel Core 2 Duo) using the same USE flags that I have on my old (Pentium M) x86 laptop.

I tried to emerge something with plenty of dependencies (okular). Only the error messages describing the circular dependencies required me to press PageUP 32 times (yes, I had to build a kernel with a huge scrollback buffer in system RAM to handle this). USE=-doc in front of the emerge command reduced this to maybe a handful of screen pages. I experimented a little and found that adding USE="-cups -doc" instead got it down to only a few lines. Finally I found that USE="-cups -doc -sdl" eliminated all such errors. So it seemed possible to bootstrap the system. Then I tried to find a minimal set of USE-flag disablings that allowed the system to be bootstrapped. This is what I needed in package.use in the end:
dev-libs/glib -doc
x11-libs/libxcb -doc
media-libs/alsa-lib -doc
gnome-extra/libgsf -doc
sys-apps/dbus -doc
gnome-base/librsvg -doc
x11-libs/cairo -doc
x11-libs/gtk+ -doc
x11-libs/pango -doc
dev-libs/atk -doc
media-libs/fontconfig -doc
gnome-base/libglade -doc
dev-python/jinja2 -doc
dev-libs/libcroco -doc
net-libs/gnutls -doc
dev-libs/DirectFB -sdl
dev-scheme/guile -emacs


Comment #10
>We cannot maintain a separate docs package for every package in the tree; that's *way* too much work.  All we can do at this point is document it and have people do a two-pass install.

As I discovered, it is only necessary to set USE=-doc for a few packages. So if the circular dependency on doc could be solved by maintaining separate doc packages just for them, it would be very valuable. It is very unfortunate if installing Gentoo would continue to be as challenging for others as it was for me now.
Comment 46 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-12-13 10:15:33 UTC
for gnome related packages, USE="doc" will change behavior in the future, see bug #262491. It should fix circular dependency issues too.
Comment 47 Peter Volkov (RETIRED) gentoo-dev 2010-02-02 07:02:37 UTC
*** Bug 303138 has been marked as a duplicate of this bug. ***
Comment 48 Peter Volkov (RETIRED) gentoo-dev 2010-02-09 09:40:00 UTC
*** Bug 303959 has been marked as a duplicate of this bug. ***
Comment 49 Samuli Suominen (RETIRED) gentoo-dev 2010-02-10 22:28:44 UTC
*** Bug 304377 has been marked as a duplicate of this bug. ***
Comment 50 Samuli Suominen (RETIRED) gentoo-dev 2010-03-01 11:01:31 UTC
*** Bug 307295 has been marked as a duplicate of this bug. ***
Comment 51 Michal Bryxí 2010-03-01 22:34:21 UTC
I can confirm, tah USE="-cups -doc" repairs circular dependencies when emerging.
Comment 52 Samuli Suominen (RETIRED) gentoo-dev 2010-03-02 02:24:06 UTC
*** Bug 307409 has been marked as a duplicate of this bug. ***
Comment 53 Ben de Groot (RETIRED) gentoo-dev 2010-03-21 16:40:32 UTC
*** Bug 309969 has been marked as a duplicate of this bug. ***
Comment 55 Carsten Lohrke (RETIRED) gentoo-dev 2010-09-12 21:58:30 UTC
*** Bug 336884 has been marked as a duplicate of this bug. ***
Comment 56 Alex Legler (RETIRED) archtester gentoo-dev Security 2011-03-29 22:10:08 UTC
*** Bug 361189 has been marked as a duplicate of this bug. ***
Comment 57 Andreas K. Hüttel archtester gentoo-dev 2012-01-27 20:38:50 UTC
Zac, is this still relevant?
Comment 58 Zac Medico gentoo-dev 2012-01-28 05:48:29 UTC
Yeah, it's still relevant. It's kind of low-priority though, especially since we now have the suggestions mentioned in comment #54.
Comment 59 Samuli Suominen (RETIRED) gentoo-dev 2012-07-04 20:50:35 UTC
*** Bug 424801 has been marked as a duplicate of this bug. ***
Comment 60 jannis 2012-07-23 11:32:41 UTC
I propose to change the "Product" of this bug to "Portage Development"
Comment 61 Michael Mol 2013-02-12 00:48:50 UTC
Is there any systemic blocker (i.e. specced semantic behavior) preventing this from being implemented at this point?
Comment 62 Zac Medico gentoo-dev 2013-02-12 00:57:22 UTC
I think it's just a matter having someone put in the time to implement it and polish it up.

Lately I've been kind of busy with polishing up the EAPI 5 stuff (working on a fix for bug 456340 now).
Comment 63 Zac Medico gentoo-dev 2018-12-16 06:32:05 UTC
Automatic USE configuration changes to solve circular deps are similar to USE changes within the context of bug 258371.
Comment 64 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-16 02:41:36 UTC
*** Bug 749342 has been marked as a duplicate of this bug. ***