diff tests/test-mac-packages.t @ 32134:197eb93560b3 stable

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 6dc8caccef8a
children 501d48bda912
line wrap: on
line diff
--- a/tests/test-mac-packages.t	Wed May 31 19:24:00 2017 -0300
+++ b/tests/test-mac-packages.t	Fri May 26 20:03:05 2017 -0400
@@ -18,6 +18,11 @@
 Gather list of all installed files:
   $ lsbom mercurial.pkg/Bom > boms.txt
 
+We've had problems with the filter logic in the past. Make sure no
+.DS_Store files ended up in the final package:
+  $ grep DS_S boms.txt
+  [1]
+
 Spot-check some randomly selected files:
   $ grep bdiff boms.txt | cut -d '	' -f 1,2,3
   ./Library/Python/2.7/site-packages/mercurial/bdiff.so	100755	0/0