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:
This is again a problem with 3.17.x:
```
Traceback (most recent call last):
  File "/opt/conda/bin/conda-build", line 11, in <module>
    load_entry_point('conda-build', 'console_scripts', 'conda-build')()
  File "/root/conda-build/conda_build/cli/main_build.py", line 445, in main
    execute(sys.argv[1:])
  File "/root/conda-build/conda_build/cli/main_build.py", line 436, in execute
    verify=args.verify, variants=args.variants)
  File "/root/conda-build/conda_build/api.py", line 209, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "/root/conda-build/conda_build/build.py", line 2275, in build_tree
    notest=notest,
  File "/root/conda-build/conda_build/build.py", line 1589, in build
    newly_built_packages = bundlers[pkg_type](output_d, m, env, stats)
  File "/root/conda-build/conda_build/build.py", line 957, in bundle_conda
    files = post_process_files(metadata, initial_files)
  File "/root/conda-build/conda_build/build.py", line 824, in post_process_files
    post_build(m, new_files, build_python=python)
  File "/root/conda-build/conda_build/post.py", line 1007, in post_build
    check_overlinking(m, files)
  File "/root/conda-build/conda_build/post.py", line 944, in check_overlinking
    m.config.channel_urls)
  File "/root/conda-build/conda_build/post.py", line 891, in check_overlinking_impl
    whitelist += missing_dso_whitelist
TypeError: 'NoneType' object is not iterable
```

Resolving patch:
diff --git a/conda_build/post.py b/conda_build/post.py
--- a/conda_build/post.py
+++ b/conda_build/post.py
@@ -888,7 +888,7 @@ def check_overlinking_impl(pkg_name, pkg_version, build_str, build_number, subdi
                 print("  ERROR :: {} not in prefix_owners".format(needed_dso))
                 sys.exit(1)
 
-    whitelist += missing_dso_whitelist
+    whitelist += missing_dso_whitelist or []
     _show_linking_messages(files, errors, needed_dsos_for_file, build_prefix, run_prefix, pkg_name,
                            error_overlinking, runpath_whitelist, verbose, requirements_run, lib_packages,
                            lib_packages_used, whitelist, sysroots, sysroot_prefix, sysroot_substitution, subdir)


Test patch: