← Back to issue list

Permission changes in files are not detected

View original Github issue

Metadata

Project
craft-parts
Number
#311
Type
issue
State
open
Author
facundobatista
Labels
—
Created
Updated
Closed
—

Current evaluation

Valid local-source change-detection bug: chmod-only updates are ignored because the pull outdated check considers timestamps but not permission modes.

Suggested action: needs triage

Reason: The issue provides a complete pack/chmod/pack reproducer, and the current LocalSource.check_if_outdated implementation confirms that files and directories are marked updated only when st_mtime is at least the target timestamp. A mode-aware comparison and regression tests are needed, with attention to symlinks and hard-linked sources; despite its age, the only recorded response is an automated Jira synchronization comment.

Evaluated by: mr-cal-bot

Impact: 52 Quick Win: 25 Complexity: 43 Confidence: 94 Actionability: 84

Issue body

When permissions are changed on a file, that file is not detected as "updated", and not re processed by the pull part. Example using charmcraft: ``` $ charmcraft clean Cleaning project 'my-super-charm'. Cleaned project 'my-super-charm'. $ charmcraft pack Packing the charm Created 'my-super-charm_ubuntu-22.04-amd64.charm'. Charms packed: my-super-charm_ubuntu-22.04-amd64.charm $ zipinfo -l my-super-charm_ubuntu-22.04-amd64.charm to_be_included.bin -rw-rw-r-- 2.0 unx 163 b- 105 defN 21-Aug-03 12:20 to_be_included.bin $ chmod -w to_be_included.bin $ ll to_be_included.bin -r--r--r-- 1 facundo facundo 163 ago 3 2021 to_be_included.bin $ charmcraft pack Packing the charm Created 'my-super-charm_ubuntu-22.04-amd64.charm'. Charms packed: my-super-charm_ubuntu-22.04-amd64.charm $ zipinfo -l my-super-charm_ubuntu-22.04-amd64.charm to_be_included.bin -rw-rw-r-- 2.0 unx 163 b- 105 defN 21-Aug-03 12:20 to_be_included.bin ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 52
Quick Win: 25
Complexity: 43
Confidence: 94
Actionability: 84
needs triage Valid local-source change-detection bug: chmod-only updates are ignored because the pull outdated check considers timestamps but not permission modes.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 39
Complexity: 30
Confidence: 80
Actionability: 80
keep open File permission changes in source directories are not detected by the state manager, preventing necessary rebuilds.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 26
Staleness: 75
Complexity: 35
Confidence: 80
Support Request: 5
needs triage Local source handler's check_if_outdated only compares st_mtime, so chmod changes are not detected as file updates during the pull step. Reported by maintainer with clear repro; no labels, no maintainer response beyond a JIRA bot ticket (CRAFT-2963).
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 75
Support Request: 5
needs triage File permission changes are not detected as updates, causing unchanged rebuilds. Reported by a maintainer ~3.7 years ago with clear reproduction steps. Currently unlabelled and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 45
Confidence: 85
Support Request: 10
close stale File permission changes are not detected during the build process, causing outdated permissions in the final archive. Open for over 3 years with only an automated Jira sync comment.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.