Add some comments about the filtering procedure

This commit is contained in:
Anders Ingemann 2015-12-13 00:14:37 +01:00
parent 5883673380
commit 50b02777e5
2 changed files with 5 additions and 0 deletions

View file

@ -1,2 +1,4 @@
#!/bin/sh
# First we filter out all paths not relating to the stuff we want to filter
# After that we take out the paths that we *do* want to keep
grep 'EXCLUDE_PATTERN' | grep --invert-match --fixed-strings 'INCLUDE_PATHS'

View file

@ -49,6 +49,9 @@ class CreateBootstrapFilterScripts(Task):
sed_i(bootstrap_script, r'BOOTSTRAP_FILES_FILTER_PATH', filter_script)
# We exclude with patterns but include with fixed strings
# The pattern matching when excluding is needed in order to filter
# everything below e.g. /usr/share/locale but not the folder itself
filter_lists = info._minimize_size['bootstrap_filter']
exclude_list = '\|'.join(map(lambda p: '.' + p + '.\+', filter_lists['exclude']))
include_list = '\n'.join(map(lambda p: '.' + p, filter_lists['include']))