On Tue, Feb 13, 2007 at 08:58:05PM +0100, David Jardine wrote:
> On Mon, Feb 12, 2007 at 04:16:02PM -0800, Andrew Sackville-West wrote:
> > On Mon, Feb 12, 2007 at 10:30:33PM +0000, John K Masters wrote:
> > 
> > [... typical panic about removing gnome-desktop-environment ...]
> > > 
> > > Just a thought. Being informed that gnome-desktop-environment is being
> > > removed would tend to scare the pants off most people, me included.
> > > Would it not be better to call these meta-packages something like
> > > gnome-desktop-environment-meta or
> > > important-sounding-package-safetoremove. Just my 0.03 euros worth.
> > > 
> > 
> > well, that's not a bad idea except... if you installed it with a
> > "removes-dependencies-automatically" package manager like aptitude,
> > its not necessarily safe to remove...
> 
> If I understand the meta-package concept right, the meta-package 
> depends on the real packages, but nothing depends on the 
> meta-package.  Removing it would therefore have no side-effects.  
> Or have I got it wrong?
> 

On surface I think you're right unless you get into the auto/manual
package tagging in aptitude.

I'll admit that I don't fully understand it within the context of
aptitude, but AIUI...

install a package called dep3, it is marked as manually installed and
will be left alone by aptitude.

install meta1, that meta-package is marked as manually
installed so aptitude will not remove it without explicit
instructions. meta1 depends on dep1, dep2, dep3. dep1 and 2 get
installed  and aptitude marks them all as automatically
installed. dep3 is already installed, fine.

now install meta2 which depends on dep2 and dep4. Now dep2 is already
installed, but not dep4 which gets pulled in and also marked as
automatically installed. 

Now you have: 

meta 1  -manual
     dep1       -auto
     dep2       -auto   
     dep3       -manual

meta 2  -manual
     dep2       -auto
     dep4       -auto

So later when you remove meta1, aptitude goes
through all its dependencies and checks to see if anything *else*
depends on them too. It looks at dep1 and sees that nothing else is
depending on it and its marked as automatically installed so marks it
for removal. Next it looks at dep2 and sees that meta2 depends on it
and leaves it. Finally it looks at dep3 and sees nothing depending on
it, but it is marked as manually installed and leaves is alone.

Likewise, another scenario using the same packages as above: I'm done
with dep3, not realising meta1 depends on it, I remove it. This breaks
meta1, so meta1 gets marked for removal as well cascading to dep1 and
dep2 (which stays because meta2 uses it). 

I don't know how accurate that all is, but that's how I view it and it
seems to keep me out of trouble. 

A

Attachment: signature.asc
Description: Digital signature

Reply via email to