← Back to issue list

commands/pack: add --destructive-mode support (CRAFT-358)

View original Github issue

Metadata

Project
charmcraft
Number
#441
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Merged after approval. Adds --destructive-mode to the pack command, updating Builder.run() for consistent destructive builds. Includes a reusable project builder fixture and refactors packaging logic.

Suggested action:

No scores available.

Issue body

- Add --destructive-mode bool parameter to pack command. - Add basic_project_builder fixture for reusable project building code to help reduce further duplication. - Update Builder.run() with parameter to indicate whether or not to build in destructive-mode. Use it when determining how to appropriate build/pack charm(s). Behavior is consistent with managed-mode. Signed-off-by: Chris Patterson <chris.patterson@canonical.com>

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged after approval. Adds --destructive-mode to the pack command, updating Builder.run() for consistent destructive builds. Includes a reusable project builder fixture and refactors packaging logic.
qwen3.6-35b-a3b-mtp-q6 Merged, adding --destructive-mode support to the pack command. The update modifies Builder.run() and introduces a reusable project builder fixture. Reviewers noted test file renaming and future migration of build logic to the pack module for follow-up.
qwen3.6-35b-a3b-mtp-q6 Merged: Added --destructive-mode support to the pack command and updated Builder.run() to handle destructive builds consistently with managed-mode. Author noted future migration of build module logic to pack.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1791201 add support for --destructive-mode snapcraft (launchpad) closed Implemented. Added --destructive-mode CLI flag and SNAPCRAFT_BUILD_ENVIRONMENT=host variable to allow building directly on the host machine instead of using Multipass.
72%
#93 feat: support "--destructive-mode". craft-application merged Merged. Implements --destructive-mode across all lifecycle commands, fixing issue #57 and a disabled rockcraft spread test. Approved by two reviewers, passed CI with 100% diff coverage, and changed three files.
71%