On Tuesday 27 February 2007 16:47:15 Alan McKinnon wrote: > > > You have a bunch of packages that --depclean wants to remove. It > > > looks like they should not be removed. > > > > A bit curious how you've reached that conclusion? Why shouldn't they? > > The OP said in his original mail > > "when I run emerge > --depclean wants remove packages that would break dependencies" > > Presumably he knows his system well enough to know that the packages in > question are necessary. > > I probably worded my statement wrongly as well. As written it implies > that --depclean erroneously wants to remove things that should remain > according to information in the ebuilds. I should have said --depclean > wants to remove things that the OP would prefer to remain.
There are at least three reasons why you cannot rely on `equery depends` to tell you if a dependency which `emerge --depclean` is going to remove is required or not. 1) USE conditionals. This is adressed in latest ~arch gentoolkit (0.2.3) which prints the conditional. You still have to check the conditional yourself. 2) "|| ( bar baz )" blocks. `equery depends bar` and `equery depends baz` will print foo as depending on them. portage and hence `emerge --depclean` only requires one of them to satisfy the dep. 3) If the ebuild exists in the tree and has been modified since it was installed `emerge --depclean` will use the modified ebuild from the tree. `equery depend` will use the ebuild that was installed in /var/db/pkg. In most if not all cases when `emerge --depclean` and `equery depends` disagree the former is correct (as of portage-2.1.1 at least (or 2.1?)). If you want to verify it with the latter you need to investigate the ebuild to see if any of the mentioned three cases apply... -- Bo Andresen
pgpoNdo5HEs70.pgp
Description: PGP signature