comparison tests/test-mac-packages.t @ 32471:014fa1ad5076

osx: override default exclude filter for pkgbuild To quote `man 1 pkgbuild`: --filter filter-expression By default, --root will include the entire contents of the given root-path in the package payload, except for any .svn or CVS directories, and any .DS_Store files. You can override these default filters by specifying one or more --filter options. Each filter-expression is an re_format(7) ``extended'' expression: any path in the root which matches any of the given expressions will be excluded from the pack- age payload. (Note that specifying even one --filter inhibits the default filters, so you must respecify the default fil- ters if you still want them to be used.) It turns out the default filter these days *also* includes .git and .hg. Notice how that filter expression is a regular expression? That (presumably unintentionally) prevents a file named "chg" or "_hg" from getting included in the distribution. Many many thanks to spectral@ for trying to include a _hg file which led us to figure this bug out. Bug filed with Apple for this as rdar://problem/32437369, mentioning both the gap in documentation and the wrong defaults.
author Augie Fackler <augie@google.com>
date Fri, 26 May 2017 20:03:05 -0400
parents 0e93dc8c0f9f
children a38ed42cd23c
comparison
equal deleted inserted replaced
32470:0e93dc8c0f9f 32471:014fa1ad5076
15 15
16 $ xar -xf Mercurial*.pkg 16 $ xar -xf Mercurial*.pkg
17 17
18 Gather list of all installed files: 18 Gather list of all installed files:
19 $ lsbom mercurial.pkg/Bom > boms.txt 19 $ lsbom mercurial.pkg/Bom > boms.txt
20
21 We've had problems with the filter logic in the past. Make sure no
22 .DS_Store files ended up in the final package:
23 $ grep DS_S boms.txt
24 [1]
20 25
21 Spot-check some randomly selected files: 26 Spot-check some randomly selected files:
22 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3 27 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3
23 ./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0 28 ./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0
24 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0 29 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0