← Back to issue list

removing a hook from snap/hooks does not remove it from prime/snap/hooks

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1916333
Type
issue
State
open
Author
~ogra
Labels
—
Created
Updated
Closed
—

Current evaluation

Removing a hook from snap/hooks leaves it in prime and the resulting snap; current asset-copy logic does not remove stale destination files, so the acknowledged bug remains open.

Suggested action: keep open

Reason: The report provides an exact reproducer, and _write_snap_directory still copies existing assets without deleting destination entries absent from the source, allowing the stale hook to persist. @~sergiusens acknowledged it as part of broader state-management work, so it is valid but may require careful handling of hooks also produced by parts.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 17 Complexity: 58 Confidence: 93 Actionability: 82

Issue body

while code changes to snap/hooks/* are properly propagated to the prime directory, the removal of a hook is not ... i.e. removing snap/hooks/configure leaves prime/snap/hooks/configure in place. re-running snapcraft --destructive-mode in a container after removing a hook just ends up with the hook still being in the package that way.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 17
Complexity: 58
Confidence: 93
Actionability: 82
keep open Removing a hook from snap/hooks leaves it in prime and the resulting snap; current asset-copy logic does not remove stale destination files, so the acknowledged bug remains open.
stealth/space-bunny-alpha
Impact: 58
Quick Win: 17
Complexity: 61
Confidence: 83
Actionability: 76
keep open Deleted project hooks remain in prime/snap/hooks and are repackaged. Acknowledged in 2021 as part of broader state-management work, but no resolving change is identified.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 17
Complexity: 30
Confidence: 80
Actionability: 80
keep open Valid bug: removing a hook from snap/hooks/ leaves stale copies in prime/snap/hooks/ because snapcraft copies hooks but never cleans up removed ones.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 22
Staleness: 85
Complexity: 45
Confidence: 55
Support Request: 5
needs triage Snapcraft bug: deleting a hook from snap/hooks/ does not remove the stale copy from prime/snap/hooks/, so the hook still ships in the package after a rebuild. Open ~5.5 years, zero comments, no labels, no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 85
Support Request: 10
close stale Snapcraft bug where removing a hook from snap/hooks/ does not update prime/snap/hooks/ on rebuild. The issue has been open for over 5 years with zero maintainer comments or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Bug where removing a hook from snap/hooks/ fails to delete it from prime/snap/hooks/ during snapcraft builds. Issue remains open with no maintainer response or activity for over five years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 85
Support Request: 10
close stale Bug in snapcraft where deleting a hook file from snap/hooks/ fails to remove it from the prime directory during builds. Issue is over 5 years old with no maintainer interaction or updates.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.