sources: fix removed file updates (CRAFT-532)
Metadata
Current evaluation
Closed unmerged; #132 superseded #129 by reverting commit 5d56713 in 5e5cb6c6, merged as 7d00e5f6, to avoid deleting build and override-pull artifacts.
Resolution: closed superseded
Reason: The proposed cleanup could remove files created by override-pull and lacked a manifest of pulled files. PR #132 instead reverted 5d56713 via commit 5e5cb6c6, merged in 7d00e5f6, requiring deleted source files to be repulled.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Source handlers are used to pull sources from the location specified
in the part definition into the part source work directory. They may
provide a method to update specific files that have been modified
without re-pulling the entire source tree.
Changes were introduced in 5d56713 to allow removal of pulled files
that have been deleted in the part source.
The local source handler, however, is not used only for the primary
source handler purpose, it's also used to migrate contents from the
source work directory to the build work directory, regardless of the
type of the part's source. (We should investigate how to refactor this
to use the migration mechanisms directly without reusing the source
handler.)
As a consequence of the way deleted file removal was implemented and
the reuse of the local source handler for build migration, artifacts
created during the build process were removed in a source update.
Deleted file updates should cover only files removed from the original
source without affecting build artifacts.
Refactor source handlers to preserve build artifacts by removing
only entries present in the source work directory that are not
in the original source from the build work directory. In the long
term part handling should be refactored to be decoupled from the
local source handler.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged; #132 superseded #129 by reverting commit 5d56713 in 5e5cb6c6, merged as 7d00e5f6, to avoid deleting build and override-pull artifacts. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged; #132 superseded #129 by reverting 5d56713 in 5e5cb6c6, merged as 7d00e5f6. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged: proposed source-handler refactor to preserve build artifacts was rejected by maintainer review; superseded by merged PR #132 (5e5cb6c6, merge 7d00e5f6) which reverted5d56713. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged: the source cleanup could delete files created by override-pull. PR #132 superseded it by reverting 5d56713 in 5e5cb6c6 (merge 7d00e5f6). | |
| qwen/qwen3.6-35b-a3b | — | — | Approved and passed CI, but closed without merging. The author rejected the solution, noting it would incorrectly remove files created by override-pull. Recommended reverting a prior commit and implementing a manifest-based approach instead. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Rejected by author. The proposed refactor incorrectly removes override-pull artifacts. Resolution involves reverting the original commit, requiring users to repull deleted local files, and implementing a pulled file manifest for future fixes. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/craft-parts#132
(confidence 100%)
Merged revert that replaced the approach proposed in #129.
-
Caused By:
canonical/craft-parts#105
(confidence 95%)
Commit 5d56713 introduced deleted-file cleanup that #129 attempted to amend.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #132 sources: revert updating deleted files in outdated check (CRAFT-532) | craft-parts | merged | Merged #132 via 5e5cb6c6, disabling deleted-file synchronization to preserve build artifacts and override-pull files; deleted sources must be repulled. |