Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168757 - circular dependency error while trying to emerge xemacs extensions
Summary: circular dependency error while trying to emerge xemacs extensions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: XEmacs team
URL:
Whiteboard:
Keywords:
: 174837 (view as bug list)
Depends on: 175560
Blocks:
  Show dependency tree
 
Reported: 2007-02-28 16:55 UTC by Paul Skomorowski
Modified: 2007-06-03 19:53 UTC (History)
1 user (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 Paul Skomorowski 2007-02-28 16:55:50 UTC
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)
Comment 1 Hans de Graaff gentoo-dev Security 2007-03-01 07:14:43 UTC
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.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2007-04-04 16:47:19 UTC
You're probably looking for PDEPEND here if all those circular deps are really necessary.
Comment 3 Hans de Graaff gentoo-dev Security 2007-04-04 16:55:01 UTC
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?
Comment 4 Hans de Graaff gentoo-dev Security 2007-04-16 19:09:58 UTC
*** Bug 174837 has been marked as a duplicate of this bug. ***
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2007-05-05 08:53:56 UTC
(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.
Comment 6 Hans de Graaff gentoo-dev Security 2007-05-05 15:14:30 UTC
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. 
Comment 7 Hans de Graaff gentoo-dev Security 2007-05-05 15:43:24 UTC
I have now fixed the worst offenders in CVS so I expect things to be fixed for the most part for stable as well.
Comment 8 Hans de Graaff gentoo-dev Security 2007-06-03 19:53:54 UTC
Closing as the packages put into stable today all use RDEPEND and hence don't have these circular dependencies.