1
0
forked from Proxmox/proxmox

fix : map missing section field to 'unknown'

needed for supporting some third-party repositories.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2023-07-25 10:31:10 +02:00 committed by Wolfgang Bumiller
parent 5ea70421b3
commit 445e032eee

View File

@ -13,7 +13,7 @@ pub struct PackagesFileRaw {
pub package: String,
pub source: Option<String>,
pub version: String,
pub section: String,
pub section: Option<String>,
pub priority: String,
pub architecture: String,
pub essential: Option<String>,
@ -84,7 +84,7 @@ impl TryFrom<PackagesFileRaw> for PackageEntry {
size: value.size.parse::<usize>()?,
installed_size,
checksums: CheckSums::default(),
section: value.section,
section: value.section.unwrap_or("unknown".to_owned()),
};
if let Some(md5) = value.md5_sum {