[pbs-devel] [PATCH proxmox] fix #4868: map missing section field to 'unknown'

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jul 25 10:31:10 CEST 2023


needed for supporting some third-party repositories.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    while the Raw variant is marked as pub, it's not actually used outside of the
    crate, so only technically a breaking change.
    
    proxmox-offline-mirror will need a bump+rebuild for the bug to be actually fixed in practice!

 proxmox-apt/src/deb822/packages_file.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-apt/src/deb822/packages_file.rs b/proxmox-apt/src/deb822/packages_file.rs
index 90b21c6..b3c84b0 100644
--- a/proxmox-apt/src/deb822/packages_file.rs
+++ b/proxmox-apt/src/deb822/packages_file.rs
@@ -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 {
-- 
2.39.2






More information about the pbs-devel mailing list