repo: fixup with python, not sed
Metadata
Current evaluation
Merged in #1181 (commit 5e3eada39), replacing sed-based xml2-config/xslt-config fixups with Python to avoid performance and plugin-environment side effects.
Resolution: closed resolved
Reason: The pull request was merged and fixes LP #1671675. It introduced Python-based content replacement and exposed file_utils.search_and_replace_contents.
Evaluated by: mr-cal-bot
No scores available.
Issue body
After unpacking stage-packages, the repo runs a number of fixup steps. One of those steps is to rewrite `usr/bin/xml2-config` and `usr/bin/xslt-config` to look within the part instead of on the host. However, this rewrite is done with sed, which has performance issues as well as poor side effects when it comes to the plugin environment.
This PR fixes LP: [#1671675](https://bugs.launchpad.net/snapcraft/+bug/1671675) by using python to fix those files instead of sed.
**Note:** This PR affects the public `file_utils` API by exposing the previously private `file_utils._search_and_replace_contents` as `file_utils.search_and_replace_contents`.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in #1181 (commit 5e3eada39), replacing sed-based xml2-config/xslt-config fixups with Python to avoid performance and plugin-environment side effects. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1181 (commit 5e3eada39), replacing sed-based xml2-config/xslt-config fixups with Python and exposing file_utils.search_and_replace_contents. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix replacing sed with Python to rewrite xml2-config and xslt-config during stage-packages unpacking, resolving performance and environment side effects. Exposes file_utils.search_and_replace_contents as a public API. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix replacing sed with Python to rewrite xml2-config and xslt-config during repo fixup, resolving performance issues and plugin environment side effects. Resolves LP #1671675 and exposes file_utils.search_and_replace_contents as a public API. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.