apt and automatic removal of unused dependencies
skaller at users.sourceforge.net
Wed Jul 6 00:39:32 CDT 2005
On Tue, 2005-07-05 at 18:36 +0200, Michael Vogt wrote:
> Right now everything that was installed by the intaller is considered
> a manual install. That means removing a meta-package does nothing. If
> you install a meta-package and then remove it later it will ask if it
> should remove the dependencies that where installed as part of that
here is my $A0.05 worth (we don't have 2c in Oz anymore ..)
Let's consider a 'theoretical' metapackage 'user' that
depends on everything the user actually uses.
Whilst 'user' is installed, the packages the user
uses will not be removed.
If the user removes a package (or replaces it with
one with different dependencies) this automatically
makes some packages unreachable.
The algorithm required to handle this is the same
as any garbage collector: the user package is just
Removing packages unreachable by the root is now
a simple well understood process that can be
put in a cron job..
The issue is how to discover if a package is actually
For example I can install package A and get its
dependency B, and then I might start using
the wonderful package B .. throw out A .. and
be very surprised when B disappeared.
It seems to me 'asking' the user 'do you want to keep
or remove package B' is the wrong approach. The user
may be using B, but has no idea of the package name.
Instead, some way of actually detecting if the user
is using B directly, or via some software that was
not installed as a package, would be a better solution.
In general, this seems impossible .. but for GNOME
it should be possible, provided an 'application'
has some way of telling GNOME what package it came
with, GNOME can then register that package as a
user 'root' package.
In turn that suggests certain kinds of packages,
such as GNOME applets or the drivers they require,
are suitable for auto-removal, whilst other packages,
such a compiler, are not (because there's no way to
actually tell if the user is using it).
(a) each package determines if it is a candidate
(b) GNOME registers a package as 'used' on invocation
of an applet that is associated with a package
(c) There has to be some way for the applet to be
associated with the package that installed it.
(d) reaping unused packages is a simple
non-interactive garbage collection algorithm
Crudely -- if there isn't an icon on the display
or in a menu .. the user can't invoke it, so
it is unreachable garbage and should be removed.
John Skaller <skaller at users dot sourceforge dot net>
Download Felix: http://felix.sf.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ubuntu.com/archives/ubuntu-devel/attachments/20050706/dde283e6/attachment.pgp
More information about the ubuntu-devel