On 01/02/2012 05:41 PM, Neil Bothwick wrote:
On Mon, 02 Jan 2012 16:33:04 -0500, Michael Orlitzky wrote:

Yes they have. Remove anything in the least suspect and emerge -cp.
Then emerge -n anything listed that you need.

I don't know which ones I need, and I can't just remove them and cross
my fingers, because these are live servers.

You remove them from the world file, not the system. Then run emerge -cp
to seen what would be depcleaned. Nothing is uninstalled and nothing
stops working.

There was a script floating around that created a new world file that
contained all installed packages that were not a dependency of another
installed package. It's not a perfect fix, but pretty close.

I gave a concrete example from one of our web servers where this would
remove something important.

How so? If anything that was not a dependency of something else was in
the world file, how could anything be removed?

I have both of these in world:

  dev-php/PEAR-Mail
  dev-php/PEAR-Mail_Mime

Let's say PEAR-Mail_Mime depends on PEAR-Mail -- it might, I haven't checked, it's just an example. And I remember installing PEAR-Mail_Mime: I needed it to receive binary attachments through a contact form on an internal site.

I suspect a customer had me install PEAR-Mail so that he could send some notifications via SMTP rather than sendmail(). Can I remove it from world?

At the moment, yes I can: PEAR-Mail_Mime depends on PEAR-Mail, so there will be no change in my --depclean output. But if I ever take down the internal site, and uninstall PEAR-Mail_Mime, depclean will want to remove PEAR-Mail, and break that guy's site. This is what that script would do.

If I know that I have been careful in the past, this is not a problem, since the contents of world will be accurate. However, I'm a little worried that I may have forgotten --oneshot and added PEAR-Mail by mistake on an upgrade. Now, I have to either risk breaking some customer's site, or leave PEAR-Mail in my world file forever.

Reply via email to