make plugin: can't copy directories or nested artifacts
Metadata
Current evaluation
Fixed in snapcore/snapcraft#809 (commit e9a495809): the make plugin now copies directory and individual artifact files into the snap.
Resolution: closed resolved
Reason: The issue was resolved by merged PR #809, commit e9a495809, which updated the make plugin to support copying directory artifacts as well as individual files.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in snapcore/snapcraft#809 (commit e9a495809): the make plugin now copies directory and individual artifact files into the snap. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#809 (commit e9a495809), which updated the make plugin to support copying directory artifacts. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged canonical/snapcraft#809 (commit e9a495809), which improved make-plugin artifact copying to support directories and nested artifacts. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#809 (commit e9a495809), which changed the make plugin to support copying directory artifacts as well as individual files. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #809 (commit e9a495809), which enabled the make plugin to copy directory artifacts recursively for camlistore packaging. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/snapcraft#809 (e9a495809), adding directory copying and missing-subdirectory creation for make-plugin artifacts. | |
| 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
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#809
(confidence 100%)
Commit e9a495809 implements directory artifact copying for the make plugin and is recorded as resolving LP#1624798.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #809 make plugin: improve artifact copying (LP: #1624798) | snapcraft | merged | Merged in canonical/snapcraft#809 via e9a495809, improving make-plugin artifact copying to support directories and address LP #1624798. | |
| #1614754 The new artifacts option of the make plugin doesn't seem to work | snapcraft (launchpad) | closed | Fixed make-plugin artifact collection so configured files are found in the part directory. Merged in canonical/snapcraft#743 as commit 5152c8094. | |
| #1478052 copy plugin doesn't handle directories | snapcraft (launchpad) | closed | Launchpad bug migrated to ubuntu-core/snapcraft#16 and closed: copy plugin already handled directory sources; PR #87 (commit 918627069, merge ebf55e30d) added a passing integration test confirming it. |