Repository: conda/conda-build

Issue:
Conda Build throws traceback for empty missing_dso_whitelist
```
# cat meta.yaml
package:
  name: the_vanisher
  version: dp2

build:
  missing_dso_whitelist:
    - /usr/lib/libresolv.9.dylib  # [osx]
```

This recipe produces a traceback on a non-osx platform:
```
[root@8d13aca83e43 recipe]# conda build  .
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from /root/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /root/conda_build_config.yaml
Attempting to finalize metadata for the_vanisher
INFO:conda_build.metadata:Attempting to finalize metadata for the_vanisher
BUILD START: ['the_vanisher-dp2-0.tar.bz2']
source tree in: /opt/conda/conda-bld/the_vanisher_1529785936708/work
Packaging the_vanisher
INFO:conda_build.build:Packaging the_vanisher
Packaging the_vanisher-dp2-0
INFO:conda_build.build:Packaging the_vanisher-dp2-0
No files or script found for output the_vanisher
WARNING:conda_build.build:No files or script found for output the_vanisher
number of files: 0
Traceback (most recent call last):
  File "/opt/conda/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 420, in main
    execute(sys.argv[1:])
  File "/opt/conda/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 411, in execute
    verify=args.verify)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/api.py", line 200, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/build.py", line 2177, in build_tree
    notest=notest,
  File "/opt/conda/lib/python3.6/site-packages/conda_build/build.py", line 1571, in build
    built_package = bundlers[output_d.get('type', 'conda')](output_d, m, env, stats)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/build.py", line 938, in bundle_conda
    files = post_process_files(metadata, initial_files)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/build.py", line 800, in post_process_files
    post_build(m, new_files, build_python=python)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/post.py", line 650, in post_build
    check_overlinking(m, files)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/post.py", line 482, in check_overlinking
    whitelist += m.meta.get('build', {}).get('missing_dso_whitelist', [])
TypeError: 'NoneType' object is not iterable
```

Sure, I can add a selector to `missing_dso_whitelist:`, but I am too lazy!


Discussion:

Resolving patch:
diff --git a/conda_build/post.py b/conda_build/post.py
--- a/conda_build/post.py
+++ b/conda_build/post.py
@@ -480,7 +480,7 @@ def check_overlinking(m, files):
                      '/System/Library/Frameworks/StoreKit.framework/*',
                      '/System/Library/Frameworks/SystemConfiguration.framework/*',
                      '/System/Library/Frameworks/WebKit.framework/*']
-    whitelist += m.meta.get('build', {}).get('missing_dso_whitelist', [])
+    whitelist += m.meta.get('build', {}).get('missing_dso_whitelist') or []
     for f in files:
         path = os.path.join(m.config.host_prefix, f)
         if not codefile_type(path):


Test patch: