← Back to issue list

utils: add helpers to read os-release entries

View original Github issue

Metadata

Project
craft-parts
Number
#44
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged after approval and CI. Adds os-release parsing helpers ported from Snapcraft with tests. Raises errors on failure. Maintainers discussed extracting the logic into a standalone utility package.

Suggested action:

No scores available.

Issue body

The `os-release` file contains operating system identification data. Add helpers to obtain information from this file, raising errors if data could not be retrieved. This implementation and accompanying tests are a direct port from `snapcraft.internal.os_release`. 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
qwen/qwen3.6-35b-a3b Merged after approval and CI. Adds os-release parsing helpers ported from Snapcraft with tests. Raises errors on failure. Maintainers discussed extracting the logic into a standalone utility package.
qwen3.6-35b-a3b-mtp-q6 Merged. Introduces utility helpers to parse os-release entries with error handling and tests, ported from Snapcraft. Reviewers agreed to eventually extract this logic into a standalone utility package for cross-project reuse.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1333 Consolidate `os-release` utils with other repositories craft-parts 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.
70%