Source: elan
Version: 3.1.1-4
Severity: wishlist
Tags: patch
X-Debbugs-Cc: n...@debian.org

Dear maintainer,

I'm about to upload a new version of rust-zip (0.6 -> 2).
A patch to make elan build with zip 2.x follows.
I'll leave to you the honor to upstream it ;)

Description: Upgrade dependency zip to 2.x.
 zip 2.0 changes type of `ZipFileData::last_modified_time` to
 `Option<zip::DateTime>`, which `ZipFile::last_modified()` now returns.
 `None` means no such data available.
 .
 `zip::DateTime::default_for_write()` writes either current time if possible,
 or the default of 1980-01-01, which is sensible (to zip, in the second case).
Author: Blair Noctis <n...@debian.org>
Last-Update: 2025-03-26
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/elan-dist/src/component/package.rs
+++ b/src/elan-dist/src/component/package.rs
@@ -125 +125 @@
-            let mtime = 
entry.last_modified().to_time()?.unix_timestamp_nanos();
+            let mtime = 
entry.last_modified().unwrap_or_else(zip::DateTime::default_for_write).to_time()?.unix_timestamp_nanos();
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -50 +50 @@
-zip = "0.6"
+zip = "2"
--- a/src/elan-dist/Cargo.toml
+++ b/src/elan-dist/Cargo.toml
@@ -25 +25 @@
-zip = "0.6"
+zip = "2"

--
Sdrager,
Blair Noctis

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to