← Back to issue list

make plugin: can't copy directories or nested artifacts

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1624798
Type
issue
State
closed
Author
~jaymell
Labels
Created
Updated
Closed

Current evaluation

Closed after a pull request was submitted to fix the make plugin. The changes update file_utils to use link_or_copy_tree for directories and automatically create missing subdirectories when copying nested artifacts.

Suggested action:

No scores available.

Issue body

I'm trying to create a snap of camlistore -- the easiest way I've found is using the 'make' plugin. However, given the way that camlistore builds its artifacts -- all artifacts go into a /bin directory -- I haven't been able to get the artifacts in the snap without some modifications to snapcraft. I've tried two different scenarios, both of which fail. The first was just to set 'bin' as the artifact and have it copy the whole directory: ``` parts: camlistore: plugin: make artifacts: - bin ``` This fails because make uses file_utils.link_or_copy, not file_utils.link_or_copy_tree. The other thing I tried was passing each artifact individually -- like this: ``` parts: camlistore: plugin: make artifacts: - bin/cammount - bin/camget - bin/camput <snip> ``` This doesn't work either, because of file_utils.link_or_copy doesn't support creating nested directories prior to copying the files. I've thrown together a PR to adddress both scenarios, which I'll submit once I file this. I'm not sure if I took the best approach, but the changes are this: . For the first scenario, have the make plugin check if the artifacts specified represent a directory, and, if so, use file_utils.link_or_copy_tree instead . For the second issue, modify file_utils.link_or_copy to create subdirectories if the directory of the destination object doesn't exist.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed after a pull request was submitted to fix the make plugin. The changes update file_utils to use link_or_copy_tree for directories and automatically create missing subdirectories when copying nested artifacts.
qwen/qwen3.6-35b-a3b Fixed and merged via an accompanying pull request that updated file_utils.link_or_copy to handle nested directories and added recursive directory copying support to the make plugin.
qwen/qwen3.6-35b-a3b Fixed by merging a PR that updates file_utils.link_or_copy to create missing subdirectories and adds directory support to the make plugin, enabling proper copying of nested artifacts and entire directories.
qwen3.6-35b-a3b-mtp-q6 Resolved by merging the contributor's PR. The update modifies file_utils to handle directory artifacts and automatically create nested destination directories, fixing the make plugin's copying limitations.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#743 make plugin: fix artifact collecting snapcraft merged Merged a fix for artifact collection in the make plugin, resolving LP #1614754. The change updates six files, adds a regression test, and received maintainer approval.
73%
#809 make plugin: improve artifact copying (LP: #1624798) snapcraft merged Merged after approval and CI checks. Improves artifact copying in the make plugin, resolving Launchpad bug #1624798 for camlistore packaging. Changes integrated into the main branch.
72%
#715 Add artifacts option to make plugin. snapcraft merged Merged the pull request adding an artifacts option to the make plugin. This copies specified files post-build, bypassing make install. Documentation was updated per review to clarify the behavior before final approval and merge.
70%