all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-offline-mirror v2 1/5] bump proxmox-apt to 0.11 and adapt to changes.
Date: Tue,  9 Jul 2024 12:47:01 +0200	[thread overview]
Message-ID: <20240709104705.1681395-2-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20240709104705.1681395-1-s.ivanov@proxmox.com>

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-07-09 10:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 10:47 [pve-devel] [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium Stoiko Ivanov
2024-07-09 10:47 ` Stoiko Ivanov [this message]
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 2/5] pool: drop superfluous check for impossible path combination Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 3/5] pool: unlink_file: fix check for empty directory Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 4/5] pool: gc: remove empty directories under link_dir Stoiko Ivanov
2024-07-09 10:47 ` [pve-devel] [PATCH proxmox-offline-mirror v2 5/5] pool: remove unused imports Stoiko Ivanov
2024-07-10 10:42 ` [pve-devel] applied-series: [PATCH proxmox-offline-mirror v2 0/5] remove snapshot directories vanished on source also on medium Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240709104705.1681395-2-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal