-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conda-build includes files from dependencies when using multiple outputs #4406
Comments
Am a little torn. See where Benjamin is coming from that conda-build typically excludes duplicate files to avoid clobbering and it is odd that it doesn't do this here. However can see why one might want to clobber anyways. Maybe there is a middle ground where clobbering requires explicitly listing the file to clobber? |
One strange thing for me: if With: outputs:
- name: dummy-libs
requirements:
host:
- openssl
files:
- lib/dummy*
test:
commands:
- test -f ${PREFIX}/lib/dummy.so
- name: dummy
requirements:
host:
- openssl
run:
- {{ pin_subpackage('dummy-libs', exact=True) }}
files:
- bin
- include We get: $ tar tvfj /opt/conda/conda-bld/linux-64/dummy-0.1.0-h3e2b116_0.tar.bz2 | grep -v info
-rw-rw-r-- 0/0 0 2022-03-25 07:50 include/dummy.h
-rwxrwxr-x 0/0 32 2022-03-25 07:50 bin/dummy.sh
$ tar tvfj /opt/conda/conda-bld/linux-64/dummy-libs-0.1.0-h3e2b116_0.tar.bz2 | grep -v info
-rw-rw-r-- 0/0 0 2022-03-25 07:50 lib/dummy.so That's not consistent and it makes it easy to create invalid packages. It'd be nice if the behaviour was the same for all outputs. |
What happens if the split package order is flipped? IOW if |
I I remove: run:
- {{ pin_subpackage('dummy-libs', exact=True) }} in the previous example, then So the order seems to have an impact but not only. |
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
I agree that when using file lists to select which files to include in each output, files in the prefix that were added by host dependencies should be automatically excluded. This should be the expected behavior because conda-build already excludes files from host dependencies when using the script method. |
Actual Behavior
I'm creating a recipe with 2 outputs using
files
to specify the files to be included in each package:In
dummy
, onlybin/dummy.sh
is included as expected.bin/openssl
isn't part of the package:$ tar tvfj /opt/conda/conda-bld/linux-64/dummy-0.1.0-h3e2b116_0.tar.bz2 | grep -v info -rwxrwxr-x 0/0 32 2022-03-24 20:42 bin/dummy.sh
In
dummy-libs
,include/openssl
is included in the package:tar tvfj /opt/conda/conda-bld/linux-64/dummy-libs-0.1.0-h3e2b116_0.tar.bz2 | grep -v info -rw-rw-r-- 0/0 0 2022-03-24 20:42 lib/dummy.so -rw-rw-r-- 0/0 358 2022-03-24 08:45 include/openssl/ecdh.h ... -rw-rw-r-- 0/0 76828 2022-03-24 08:45 include/openssl/evp.h -rw-rw-r-- 0/0 0 2022-03-24 20:42 include/dummy.h
Expected Behavior
The
dummy-libs
package should only include:lib/dummy.so
include/dummy.h
include/openssl
shouldn't be added to the package.Steps to Reproduce
Dummy recipe to reproduce the issue: https://github.com/beenje/dummy-package/tree/main/recipe
git clone https://github.com/beenje/dummy-package.git cd dummy-package conda build recipe
Output of conda info
The text was updated successfully, but these errors were encountered: