[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: file filtering in dpkg -i


On Mon, 2010-05-17 at 13:34:28 +0200, Martin Pitt wrote:
> for a project of mine (embedded/thin client system) I need to bring up
> a reasonably useful system in as little disk space as possible. This
> involves careful selection of packages, file system, etc., but one
> part of this is also to reduce the footprint of packages themselves,
> such as removing documentation.
> A flexible and convenient way to do this would be to allow the user to
> specify filter expressions to dpkg -i (and thus to
> /etc/dpkg/dpkg.cfg.d/), such as removing /usr/share/man/* or
> everything from /usr/share/doc/* except "copyright" (which probably
> needs to stay for legal reasons).

> I would be happy to work on an implementation of this, i. e. an
> --ignore option which taskes regexps for files which should be ignored
> on package extraction. .
> Is this a feature which you would want and accept upstream in Debian?
> Depending on this I can do either a clean patch and discuss it with
> you (including update of the corresponding .md5sums and .list files,
> manpages, etc.), or create a really minimal quick'n'dirty patch which
> is easy to carry in my local installation.

Tollef implemented this some time ago, I've a cleaned up branch in my
repository (git://git.hadrons.org/git/debian/dpkg/dpkg.git pu/filters).
It was not merged because it was waiting on documentation. Additionally
as you mention, now that we have directory configuration fragment
loading, it would probably make more sense to add inclusion and
exclusion options instead. Something else that came up while discussing
the implementation was the semantics of inclusion and exclusions
depending on their order (I can try to fish the irc logs for that one).

If you are willing to finish this, it would be great.


Reply to: