distro_info: read the YAML local series path, drop the dead dist_info stanza

This commit is contained in:
2026-09-18 13:09:02 +02:00
parent b489db2728
commit 941f91decf
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -3,10 +3,9 @@
## update and maintain such data in one unique place
## The goal is to have the minimal possible set of data necessary
## to grab the actual data. For example we don't want to store every Ubuntu
## or Debian series, but rather an URL where we can properly access that data.
dist_info:
local: /usr/share/distro-info/{dist}
network: https://salsa.debian.org/debian/distro-info-data/-/raw/main/
## or Debian series, but rather pointers to where that data lives: each dist
## entry below carries its series sources (the local distro-info CSV, with
## the network URL as fallback).
dist:
debian:
base_url: https://deb.debian.org/debian
+1 -1
View File
@@ -240,7 +240,7 @@ pub async fn get_ordered_series(dist: &str) -> Result<Vec<SeriesInformation>, Bo
})?;
let series_info = &dist_data.series;
let content = if Path::new(series_info.local.as_str()).exists() {
std::fs::read_to_string(format!("/usr/share/distro-info/{dist}.csv")).map_err(|e| {
std::fs::read_to_string(series_info.local.as_str()).map_err(|e| {
format!(
"Failed to read distribution series data for '{dist}' \
from '{}': {}. The 'distro-info' package provides these CSV files.",