This started as an Emdebian idea but it is growing into a more all-purpose option. The requirement is to be able to filter packages during installation or cross-building so that manpages, infopages, documentation (including changelogs, copyright and readme etc.) and translation files for unsupported locales are omitted. When installing, the files would simply not appear on the filesystem or in the dpkg status information. When building, the files would disappear from the package completely (hence the role of filtering in Emdebian). The intention is that embedded systems can have empty
/usr/share/man/ /usr/share/info/ and
/usr/share/doc directories and a much reduced number of translation files in
/usr/share/locale - the default would be only the translation files for languages that are supported on that machine, via
'dpkg-reconfigure locales'. Initially, only the narrow filters needed by Emdebian were considered - discussions at DebConf7 have shown how this can be easily extended to support arbitrary filters - necessarily the risks of using such optional filters would be made clear to the users in the manpage etc. - so that any file in any package could be omitted from the install process
and the package file lists as well as during the preparation of packages for embedded devices.
Filters would be glob patterns held in a file in /etc/ (possibly
/etc/dpkg/filters.d/) and would include the option to exclude files
en-masse and specifically include some files that may otherwise be excluded in specific circumstances. The same filters could be used when building packages for embedded usage as well as installing Debian packages on systems where space is a problem. The main benefit of this filtering for Emdebian is that it makes it much easier to isolate the package changes needed to make the package cross-compilable from the changes needed to remove stuff that embedded devices don't need but which Debian Policy requires. This in turn makes Emdebian patches more useful to Debian maintainers when bugs are filed on their packages about a failed cross-build.
So far, it's taken up most of my hacking time in DebConf. Ian Jackson, Enrico Zini and Wookey have all helped improve the original ideas during that time. Prototype code is mostly complete but the extended filtering support will now have to wait until after DebConf. I'm hopeful that the patch will be accepted, once it is ready.
If this seems strange or unnecessary, just compare the disc usage of
/usr/share/doc (which you can control) with
/usr/share/locale/ (which you cannot currently control) or
view the baobab images from my current laptop installation.