Repository: conda/conda-build

Issue:
skip-existing does not work on conda-build 3.0.3
I recently upgraded conda-build on windows to 3.0.3 and now the skip-existing flag doesnt work anymore. A downgrade to 2.1.17 helped as a workaround


Discussion:
it seems to produce a crash on linux and windows...

```
$ conda build eigen3/ --skip-existing                                                                                     2 changed files   

The following NEW packages will be INSTALLED:

    bzip2:   1.0.6-3 
    cmake:   3.6.3-0 
    curl:    7.54.1-0
    expat:   2.1.0-0 
    krb5:    1.13.2-0
    libssh2: 1.8.0-0 
    ncurses: 5.9-10  
    openssl: 1.0.2l-0
    xz:      5.2.2-1 
    zlib:    1.2.8-3 

Source cache directory is: /home/gabm/miniconda3/conda-bld/src_cache
Found source in cache: eigen3-3.2.9.tar.gz
Extracting download
source tree in: /home/gabm/miniconda3/conda-bld/eigen3_1499676998380/work
Attempting to finalize metadata for eigen3
INFO:conda_build.metadata:Attempting to finalize metadata for eigen3
Traceback (most recent call last):
  File "/home/gabm/miniconda3/bin/conda-build", line 6, in <module>
    sys.exit(conda_build.cli.main_build.main())
  File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/cli/main_build.py", line 340, in main
    execute(sys.argv[1:])
  File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/cli/main_build.py", line 331, in execute
    noverify=args.no_verify)
  File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/api.py", line 183, in build
    need_source_download=need_source_download, config=config, variants=variants)
  File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/build.py", line 1615, in build_tree
    built_packages=built_packages,
  File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/build.py", line 1009, in build
    package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
  File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/build.py", line 1009, in <listcomp>
    package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
ValueError: not enough values to unpack (expected 3, got 2)
```
I see the same on linux: 
`
Traceback (most recent call last):
  File "/data/local/thatrob/miniconda3/bin/conda-build", line 6, in <module>
    sys.exit(conda_build.cli.main_build.main())
  File "/data/local/thatrob/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 340, in main
    execute(sys.argv[1:])
  File "/data/local/thatrob/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 331, in execute
    noverify=args.no_verify)
  File "/data/local/thatrob/miniconda3/lib/python3.6/site-packages/conda_build/api.py", line 183, in build
    need_source_download=need_source_download, config=config, variants=variants)
  File "/data/local/thatrob/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 1615, in build_tree
    built_packages=built_packages,
  File "/data/local/thatrob/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 1009, in build
    package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
  File "/data/local/thatrob/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 1009, in <listcomp>
    package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
ValueError: not enough values to unpack (expected 3, got 2)
`

Thanks for the reports. There is a test for this, but it apparently didn't
work. I'll investigate today.

On Jul 10, 2017 3:57 AM, "gabm" <notifications@github.com> wrote:

> it seems to produce a crash on linux and windows...
>
> $ conda build eigen3/ --skip-existing                                                                                     2 changed files
>
> The following NEW packages will be INSTALLED:
>
>     bzip2:   1.0.6-3
>     cmake:   3.6.3-0
>     curl:    7.54.1-0
>     expat:   2.1.0-0
>     krb5:    1.13.2-0
>     libssh2: 1.8.0-0
>     ncurses: 5.9-10
>     openssl: 1.0.2l-0
>     xz:      5.2.2-1
>     zlib:    1.2.8-3
>
> Source cache directory is: /home/gabm/miniconda3/conda-bld/src_cache
> Found source in cache: eigen3-3.2.9.tar.gz
> Extracting download
> source tree in: /home/gabm/miniconda3/conda-bld/eigen3_1499676998380/work
> Attempting to finalize metadata for eigen3
> INFO:conda_build.metadata:Attempting to finalize metadata for eigen3
> Traceback (most recent call last):
>   File "/home/gabm/miniconda3/bin/conda-build", line 6, in <module>
>     sys.exit(conda_build.cli.main_build.main())
>   File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/cli/main_build.py", line 340, in main
>     execute(sys.argv[1:])
>   File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/cli/main_build.py", line 331, in execute
>     noverify=args.no_verify)
>   File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/api.py", line 183, in build
>     need_source_download=need_source_download, config=config, variants=variants)
>   File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/build.py", line 1615, in build_tree
>     built_packages=built_packages,
>   File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/build.py", line 1009, in build
>     package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
>   File "/home/gabm/miniconda3/lib/python3.5/site-packages/conda_build/build.py", line 1009, in <listcomp>
>     package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
> ValueError: not enough values to unpack (expected 3, got 2)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda-build/issues/2172#issuecomment-314046898>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AACV-VGdb9d-fUS3kFKN4yLK0f9m2W8Tks5sMeeAgaJpZM4OShWU>
> .
>


Resolving patch:
diff --git a/conda_build/build.py b/conda_build/build.py
--- a/conda_build/build.py
+++ b/conda_build/build.py
@@ -1006,7 +1006,7 @@ def build(m, post=None, need_source_download=True, need_reparse_in_env=False, bu
                         "are already built in {0}, skipping.".format(package_locations))
                 return default_return
             else:
-                package_locations = [bldpkg_path(om) for om, _, _ in output_metas]
+                package_locations = [bldpkg_path(om) for _, om in output_metas]
         else:
             package_locations = [bldpkg_path(om) for _, om in output_metas]
 


Test patch: