From 941f91decff249606d3e9ac0806cf9dfcec24e23 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Fri, 18 Sep 2026 13:09:02 +0200 Subject: [PATCH] distro_info: read the YAML local series path, drop the dead dist_info stanza --- distro_info.yml | 7 +++---- src/distro_info.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/distro_info.yml b/distro_info.yml index b448366..92300b3 100644 --- a/distro_info.yml +++ b/distro_info.yml @@ -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 diff --git a/src/distro_info.rs b/src/distro_info.rs index c810bd7..a374e57 100644 --- a/src/distro_info.rs +++ b/src/distro_info.rs @@ -240,7 +240,7 @@ pub async fn get_ordered_series(dist: &str) -> Result, 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.",