Every time I want to install some extensions to xemacs I get follwoing circular dependcy error. Reproducible: Always Steps to Reproduce: 1.emerge -av app-xemacs/prog-modes Actual Results: Calculating dependencies... done! !!! Error: circular dependencies: ('ebuild', '/', 'app-xemacs/prog-modes-1.72', 'merge') depends on ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/xemacs-devel-1.50', 'merge') (hard) ('ebuild', '/', 'app-xemacs/edit-utils-1.98', 'merge') (hard) ('ebuild', '/', 'app-xemacs/efs-1.29', 'merge') (hard) ('ebuild', '/', 'app-xemacs/ediff-1.66', 'merge') (hard) ('ebuild', '/', 'app-xemacs/vc-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/edit-utils-1.98', 'merge') depends on ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/xemacs-devel-1.50', 'merge') (hard) ('ebuild', '/', 'app-xemacs/bbdb-1.21', 'merge') depends on ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') (hard) ('ebuild', '/', 'app-xemacs/edit-utils-1.98', 'merge') (hard) ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mh-e-1.17', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') depends on ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/pcl-cvs-1.64', 'merge') depends on ('ebuild', '/', 'app-xemacs/prog-modes-1.72', 'merge') (hard) ('ebuild', '/', 'app-xemacs/edit-utils-1.98', 'merge') (hard) ('ebuild', '/', 'app-xemacs/ediff-1.66', 'merge') (hard) ('ebuild', '/', 'app-xemacs/vc-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/efs-1.29', 'merge') depends on ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/net-utils-1.32', 'merge') depends on ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') (hard) ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/bbdb-1.21', 'merge') (hard) ('ebuild', '/', 'app-xemacs/efs-1.29', 'merge') (hard) ('ebuild', '/', 'app-xemacs/ediff-1.66', 'merge') depends on ('ebuild', '/', 'app-xemacs/prog-modes-1.72', 'merge') (medium) ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') (medium) ('ebuild', '/', 'app-xemacs/pcl-cvs-1.64', 'merge') (medium) ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') depends on ('ebuild', '/', 'app-xemacs/mailcrypt-2.12', 'merge') (hard) ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/net-utils-1.32', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mh-e-1.17', 'merge') (hard) ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') depends on ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mailcrypt-2.12', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mh-e-1.17', 'merge') (hard) ('ebuild', '/', 'app-xemacs/vc-1.35', 'merge') depends on ('ebuild', '/', 'app-xemacs/ediff-1.66', 'merge') (hard) ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mailcrypt-2.12', 'merge') depends on ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mh-e-1.17', 'merge') (hard) ('ebuild', '/', 'app-xemacs/xemacs-devel-1.50', 'merge') depends on ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') (hard) ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard) ('ebuild', '/', 'app-xemacs/dired-1.13', 'merge') depends on ('ebuild', '/', 'app-xemacs/prog-modes-1.72', 'merge') (hard) ('ebuild', '/', 'app-xemacs/mh-e-1.17', 'merge') depends on ('ebuild', '/', 'app-xemacs/gnus-1.71', 'merge') (hard) ('ebuild', '/', 'app-xemacs/tm-1.35', 'merge') (hard) ('ebuild', '/', 'app-xemacs/rmail-1.13', 'merge') (hard)
All of the dependencies of the xemacs packages are runtime dependencies, so portage really should not complain about this. I will look into this in more detail later, but to get things going it is best to install a few of the packages manually without dependencies first: emerge --nodeps app-xemacs/xemacs-devel app-xemacs/dired Looks like that should cover all of the circular dependencies. After having these installed it should be possible to emerge prog-modes in the usual way.
You're probably looking for PDEPEND here if all those circular deps are really necessary.
The dependencies are based on what upstream describes. I'm sure each of these dependencies is needed for at least some part of the code. Looking at PDEPEND I'm not sure if it is a good solution for this case, because for it to work I have to specify which dependencies are Post and which are normal Runtime. But I'm not sure I can really say that here, certainly not in an automated way. How I think RDEPEND should work is that it should emerge all the packages that are specified with it in the same session without *any* care for the order, as long as all the packages specified in RDEPENDs are emerged at the end of the session. I see that this is also what is described in current PMS. Hmm. Should I file a bug for portage?
*** Bug 174837 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > The dependencies are based on what upstream describes. I'm sure each of these > dependencies is needed for at least some part of the code. Looking at PDEPEND > I'm not sure if it is a good solution for this case, because for it to work I > have to specify which dependencies are Post and which are normal Runtime. But > I'm not sure I can really say that here, certainly not in an automated way. > > How I think RDEPEND should work is that it should emerge all the packages that > are specified with it in the same session without *any* care for the order, as > long as all the packages specified in RDEPENDs are emerged at the end of the > session. I see that this is also what is described in current PMS. Hmm. Should > I file a bug for portage? No need. PDEPEND has been specifically added as a bandaid to avoid such circular dependencies IIRC. The main reason for RDEPENDs to be merged before the depending packages (except for implementation internals) is that users can use them right away (think `emerge kde`, people can use xorg-server long before kde is installed) and if a merge fails the already installed packages are generally functional. You could ask Zac if the new resolver will handle this differently though. Anyway, plese get this resolved ASAP, it creates a bad impression of Gentoo and there are more than just the two cycles you noted (probably still incomplete): * prog-modes depends on dired, and dired depends on prog-modes * rmail depends on tm, and tm depends on rmail * gnus depends on mailcrypt, and mailcrypt depends on gnus Another option would be to look into merging some of those packages with direct reference cycles.
I should have looked at the original report more closely rather than jumping to conclusions. The original report tries to emerge the currently stable packages. These date from ~2003 and are way out of date, but more importantly they also use DEPEND to specify dependencies instead of RDEPEND. Only the new packages (currently only in ~arch) use RDEPEND. I have tested the particular case in more detail, and with stable there is indeed a circular dependency. With ~arch this goes away because of the use of RDEPEND. So it seems that RDEPEND does indeed do what I thought it would do, although perhaps not entirely what I described in comment #3. This problem goes away for ppc and x86 (and hopefull the other arches as well) when bug 175560 is closed.
I have now fixed the worst offenders in CVS so I expect things to be fixed for the most part for stable as well.
Closing as the packages put into stable today all use RDEPEND and hence don't have these circular dependencies.