fix(zip): include linked directories in created zips
Metadata
Current evaluation
Merged #1745 (commit ac08e98e) restored Charmcraft 2.x symlink-following behavior, including linked directories in generated charm and bundle ZIPs; documented in the 3.1.0 changelog.
Resolution: closed resolved
Reason: PR #1745 was approved and merged as commit ac08e98e. It fixes #1719 by making build_zip include symlinked directories, and the 3.1.0 changelog records the fix.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Makes `build_zip` use the Charmcraft 2.x behaviour of following symlinks even for directories:
https://github.com/canonical/charmcraft/blob/2.7.1/charmcraft/package.py#L440
This ensures that not only symlinked files, but also symlinked dirs are included in the resulting charm or bundle.
Fixes #1719
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #1745 (commit ac08e98e) restored Charmcraft 2.x symlink-following behavior, including linked directories in generated charm and bundle ZIPs; documented in the 3.1.0 changelog. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1745 (commit ac08e98e) restores Charmcraft 2.x symlink-following in build_zip so linked directories are included in produced charm/bundle zips. Closes #1719. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1745 in commit ac08e98e, restoring directory-symlink traversal in build_zip so linked directories are included in generated charms and bundles; fixes #1719. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1745 (commit ac08e98e), making build_zip follow directory symlinks as in Charmcraft 2.x and fixing #1719. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Updates build_zip to follow directory symlinks, matching Charmcraft 2.x behavior and ensuring linked directories are packaged in charms and bundles. Resolves #1719. Approved by two reviewers and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to fix #1719. Updated build_zip to follow directory symlinks, matching Charmcraft 2.x behavior and ensuring linked directories are included in charm and bundle archives. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#1719
(confidence 100%)
The linked issue reported omitted symlinked directories; PR #1745 explicitly fixes it and the issue is closed.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1719 Charmcraft 3.x not including symlinked directories in resulting charm | charmcraft | closed | Charmcraft 3.x dropped symlinked directories (e.g. hooks/charmhelpers) from charm ZIPs due to Path.rglob() not following dir symlinks. Fixed by PR #1745, commit ac08e98e, which restored 2.x os.walk(followlinks=True) behaviour; shipped in Charmcraft 3.1.0. |