[pve-devel] [PATCH proxmox-offline-mirror v2 1/5] bump proxmox-apt to 0.11 and adapt to changes.

Stoiko Ivanov s.ivanov at proxmox.com
Tue Jul 9 12:47:01 CEST 2024


The recent changes to proxmox-apt along with the introduction of the
proxmox_apt_apit_types crate led to the following changes.

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 Cargo.toml     |  3 ++-
 debian/control |  3 ++-
 src/lib.rs     |  5 +++--
 src/mirror.rs  | 11 +++++------
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index edcdb87..39461c5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,7 +26,8 @@ sequoia-openpgp = { version = "1.12" }
 walkdir = "2.3.1"
 xz2 = "0.1"
 
-proxmox-apt = { version = "0.10.9" }
+proxmox-apt = "0.11"
+proxmox-apt-api-types = "1.0"
 proxmox-async = "0.4"
 proxmox-http = { version = "0.9", features = [ "client-sync", "client-trait" ]}
 proxmox-router = { version = "2", features = [ "cli" ], default_features = false }
diff --git a/debian/control b/debian/control
index 86b6cfb..8063c2b 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@ Build-Depends: bash-completion,
                librust-lazy-static-1+default-dev (>= 1.4-~~),
                librust-nix-0.26+default-dev (>= 0.26.1-~~),
                librust-openssl-0.10+default-dev,
-               librust-proxmox-apt-0.10+default-dev (>= 0.10.9~~),
+               librust-proxmox-apt-api-types-dev,
+               librust-proxmox-apt-0.11+default-dev,
                librust-proxmox-async-0.4+default-dev,
                librust-proxmox-http-0.9+client-sync-dev,
                librust-proxmox-http-0.9+client-trait-dev,
diff --git a/src/lib.rs b/src/lib.rs
index 8de1f33..8d5ca3f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -16,7 +16,8 @@ use std::{
 
 use anyhow::{format_err, Error};
 use medium::MirrorInfo;
-use proxmox_apt::repositories::{APTRepository, APTRepositoryFile, APTRepositoryFileType};
+use proxmox_apt::repositories::{APTRepositoryFileImpl, APTRepositoryImpl};
+use proxmox_apt_api_types::{APTRepository, APTRepositoryFile, APTRepositoryFileType};
 use types::Snapshot;
 
 /// Main configuration file containing definitions of mirrors, external media and subscription keys.
@@ -140,7 +141,7 @@ pub fn generate_repo_file_line(
     repo.uris = vec![format!("file://{}", snapshot_path)];
 
     repo.options
-        .push(proxmox_apt::repositories::APTRepositoryOption {
+        .push(proxmox_apt_api_types::APTRepositoryOption {
             key: "check-valid-until".to_string(),
             values: vec!["false".to_string()],
         });
diff --git a/src/mirror.rs b/src/mirror.rs
index 073df86..40ee120 100644
--- a/src/mirror.rs
+++ b/src/mirror.rs
@@ -20,13 +20,12 @@ use crate::{
     types::{Diff, Snapshot, SNAPSHOT_REGEX},
     FetchResult, Progress,
 };
-use proxmox_apt::{
-    deb822::{
-        CheckSums, CompressionType, FileReference, FileReferenceType, PackagesFile, ReleaseFile,
-        SourcesFile,
-    },
-    repositories::{APTRepository, APTRepositoryPackageType},
+
+use proxmox_apt::deb822::{
+    CheckSums, CompressionType, FileReference, FileReferenceType, PackagesFile, ReleaseFile,
+    SourcesFile,
 };
+use proxmox_apt_api_types::{APTRepository, APTRepositoryPackageType};
 
 use crate::helpers;
 
-- 
2.39.2





More information about the pve-devel mailing list