1 |
On Mon, 02 Jan 2012 11:33:43 -0500 |
2 |
Michael Orlitzky <michael@××××××××.com> wrote: |
3 |
|
4 |
> On 01/02/2012 11:16 AM, Michael Mol wrote: |
5 |
> >> |
6 |
> >> Fine for your home PC, doesn't cut it on servers. I have the |
7 |
> >> following in one of my world files: |
8 |
> >> |
9 |
> >> dev-php/PEAR-Mail |
10 |
> >> dev-php/PEAR-Mail_Mime |
11 |
> >> dev-php/PEAR-PEAR |
12 |
> >> dev-php/PEAR-Structures_Graph |
13 |
> >> |
14 |
> >> which of those do I want? At least one of them was installed to |
15 |
> >> support a customer's custom PHP application. Maybe all of them |
16 |
> >> were and they all belong in world. No one knows, this server is |
17 |
> >> older than the current --update behavior. |
18 |
> >> |
19 |
> >> So which ones can I remove? |
20 |
> >> |
21 |
> >> Solutions involving time travel and/or losing customers will be |
22 |
> >> disqualified. |
23 |
> > |
24 |
> > Make a backup copy of your world file. |
25 |
> > |
26 |
> > 1a. Remove those four lines. |
27 |
> > 2a. emerge -p --depclean |
28 |
> > 3a. Did any of those show up in the to-be-removed set? Add them |
29 |
> > back. |
30 |
> > |
31 |
> > Alternately: |
32 |
> > 1b. emerge -pev --tree --with-bdeps=y @world |
33 |
> > 2b Find those packages in the output. The tree form of the display |
34 |
> > will help you see if anything is depending on them. |
35 |
> > 3b. If anything is depending on them, you should be able to safely |
36 |
> > remove them from your world file. I'd follow up with the 1a, 2a, 3a |
37 |
> > solution to be sure. |
38 |
> > |
39 |
> |
40 |
> Sorry, but these won't work. |
41 |
> |
42 |
> Let's say that dev-php/PEAR-Mail_Mime has a dependency on |
43 |
> dev-php/PEAR-Mail, but I have a customer who needs dev-php/PEAR-Mail |
44 |
> for a contact form. |
45 |
> |
46 |
> Following your process, I would remove dev-php/PEAR-Mail from my |
47 |
> world file. If I ever remove dev-php/PEAR-Mail_Mime, depclean will |
48 |
> remove PEAR-Mail and break the guy's site. |
49 |
> |
50 |
cocktail |
51 |
Neil's suggestion of sets sounds like what you want here. Unfortunately |
52 |
it only works smoothly on first emerge (later on you have to dig |
53 |
through dep graphs to find the full dep list): |
54 |
|
55 |
First run emerge -p to find all the packages that will be pulled in, |
56 |
and add the whole lot to a set with a clear name that indicates it's |
57 |
function. Then emerge that set. As you discover further deps you can |
58 |
manually add them to the set |
59 |
|
60 |
It's quite a lot of extra work and you have to remember to do it, but |
61 |
it has the benefit of being somewhat self-documenting, at least in |
62 |
terms of having a record of what set pulled a package in initially. |
63 |
|
64 |
-- |
65 |
Alan McKinnnon |
66 |
alan.mckinnon@×××××.com |