$Id$

Inspired by FreeBSD's pkg_cutleaves, port_cutleaves is an interactive script
that eases the uninstallation of leaves - installed ports that are unrequested
and have no dependents.

An example run is as follows:

[Leaf 1 of 2] mercurial @1.1.2_0+bash_completion (Active):
  [keep] / (u)ninstall / (f)lush / (a)bort: u
** mercurial @1.1.2_0+bash_completion will be uninstalled.

[Leaf 2 of 2] subversion @1.5.5_0+bash_completion+tools+unicode_path (Active):
  [keep] / (u)ninstall / (f)lush / (a)bort:
** subversion @1.5.5_0+bash_completion+tools+unicode_path will be kept.

--->  Deactivating mercurial @1.1.2_0+bash_completion
--->  Uninstalling mercurial @1.1.2_0+bash_completion

The following ports were uninstalled:
  mercurial @1.1.2_0+bash_completion

Search for new leaves?
  [no] / (y)es: y

[Leaf 1 of 3] py25-bz2 @2.5.4_0 (Active):
  [keep] / (u)ninstall / (f)lush / (a)bort: u
** py25-bz2 @2.5.4_0 will be uninstalled.

[Leaf 2 of 3] py25-hashlib @2.5.4_0 (Active):
  [keep] / (u)ninstall / (f)lush / (a)bort: u
** py25-hashlib @2.5.4_0 will be uninstalled.

[Leaf 3 of 3] py25-zlib @2.5.4_0 (Active):
  [keep] / (u)ninstall / (f)lush / (a)bort: u
** py25-zlib @2.5.4_0 will be uninstalled.

--->  Deactivating py25-bz2 @2.5.4_0
--->  Uninstalling py25-bz2 @2.5.4_0
--->  Deactivating py25-hashlib @2.5.4_0
--->  Uninstalling py25-hashlib @2.5.4_0
--->  Deactivating py25-zlib @2.5.4_0
--->  Uninstalling py25-zlib @2.5.4_0

The following ports were uninstalled:
  py25-bz2 @2.5.4_0
  py25-hashlib @2.5.4_0
  py25-zlib @2.5.4_0

Search for new leaves?
  [no] / (y)es: y

There are no new leaves to process.