← Back to issue list

Consolidate `os-release` utils with other repositories

View original Github issue

Metadata

Project
craft-parts
Number
#1333
Type
issue
State
open
Author
bepri
Labels
Status: Triaged
Created
Updated
Closed
—

Current evaluation

Replace Craft Parts' hand-rolled os-release parser with the distro library; maintainers agreed on this direction, but no implementation has landed and the work remains open.

Suggested action: keep open

Reason: The Status: Triaged label and @lengau's proposal to switch to distro, endorsed by maintainer @bepri, establish a valid direction. OsRelease still parses files naively with split("="), while distro is only a development dependency, so production dependency, chroot parsing, error handling, and test migration work remains. The maintainer also noted that cross-project upstreaming is difficult because Parts and Providers do not depend on each other.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 14 Complexity: 56 Confidence: 93 Actionability: 78

Issue body

### What needs to get done Consolidate the strategy used in Craft Parts for parsing the `os-release` file with those found in Craft Providers or Charmcraft. ### Why it needs to get done Spawned from the TODO comment here: https://github.com/canonical/craft-parts/blob/a20b49d1b27ecd00ab74eb786d0f2403184adc97/craft_parts/utils/os_utils.py#L277

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 14
Complexity: 56
Confidence: 93
Actionability: 78
keep open Replace Craft Parts' hand-rolled os-release parser with the distro library; maintainers agreed on this direction, but no implementation has landed and the work remains open.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 15
Complexity: 30
Confidence: 80
Actionability: 70
keep open Consolidate os-release parsing in craft-parts with craft-providers/charmcraft by switching to the distro library. Triaged, under discussion.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18
Staleness: 55
Complexity: 40
Confidence: 72
Support Request: 0
keep open Consolidate os-release parsing in Craft Parts with Craft Providers/Charmcraft. Triaged; maintainers agreed to switch to the `distro` library. No PR yet; OsRelease class still present in codebase.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 25
Confidence: 75
Support Request: 0
keep open Triaged task to consolidate os-release parsing across Craft Parts, Providers, and Charmcraft. Suggests switching to the distro package. Inactive for over 9 months with no assignee or PR.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 65
Confidence: 80
Support Request: 5
keep open Consolidate os-release parsing logic across Craft Parts, Craft Providers, and Charmcraft. Triaged by maintainer, currently inactive for ~9.5 months with a suggestion to switch to the distro library.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-providers#797 (confidence 90%)

    Merged work replaced another craft repository's os-release parsing with a proper lexer, highlighting the parsing-correctness concerns behind consolidation.

Related issues

Issue Project State Summary Similarity
#1569 feat: deprecate OsRelease in favor of distro craft-parts closed Closed unmerged and superseded by canonical/craft-parts#1581, which carries forward the OsRelease deprecation in favor of distro.
71%
#59 util: replace os_release.py with distro package craft-archives merged Merged PR #59 by lengau replaced craft-archives' hand-rolled os_release.py with the upstream distro package, adding distro>=1.3.0 to pyproject.toml. Merged as commit 0d2ba14 (5 files, +15/-105); verified downstream in snapcraft#4155 and rockcraft#268.
71%