Hello, everyone.

As part of new GLEP effort, I'm working on improving INSTALL_MASK
support in Portage to make it cleaner and more featureful. Here's
the first set of commits resulting from this.

The previous implementation of INSTALL_MASK was done purely in bash.
Long story short, Portage removed all files matching one of INSTALL_MASK
patterns from the installation image.

My implementation is done purely as a filter in Python. The ebuild
configuration bits now generate final list of INSTALL_MASK. It is
afterwards used in vartree bits to filter files while checking for
collisions, merging and unmerging appropriately.

The major differences/improvements are:

* The files are actually left in image directory. Not that it makes any
  real difference but it is a bit cleaner and more like real mask this

* The pre-install "removing" output has been replaced by listing files
  with "###" zing in merging output (which means "not installed due

* All masked files are now listed in vdb CONTENTS. Therefore, tools
  like app-portage/install-mask can now figure out to which packages
  masks were applied and rebuild them on mask changes appropriately.

* Mask exclusions are supported now. Which means you can do e.g.:
  INSTALL_MASK="/usr/share/locale -/usr/share/locale/foo".

* The code is now whitespace-safe. While patterns specified
  in INSTALL_MASK directly still can not contain spaces, pattern groups
  will be able to use them.

In a few days, I'll try to provide a part II that would implement
the actual mask groups. However, I may need some help adding support
for the configuration files.

I'm not touching PKG_INSTALL_MASK for now since it's harder and outside
of the scope of what I'm trying to achieve.

Michał Górny (3):
  portage.package.ebuild.config: Move FEATURES=no* handling there
  Move INSTALL_MASK handling into merging
  portage.dbapi.vartree: Support exclusions in INSTALL_MASK

 bin/misc-functions.sh                |  30 ----------
 pym/portage/dbapi/vartree.py         | 104 ++++++++++++++++++++++-------------
 pym/portage/package/ebuild/config.py |  10 ++++
 3 files changed, 76 insertions(+), 68 deletions(-)


Reply via email to