From cf85c7c277af980ba0f7d03d561417f4c7797a6c Mon Sep 17 00:00:00 2001 From: Sergey Konev Date: Mon, 2 Dec 2024 20:44:07 +0300 Subject: [PATCH] Removed CheckInstall repo's proccessing --- proxmox-apt-api-types/src/lib.rs | 3 --- proxmox-apt/src/repositories/mod.rs | 1 - proxmox-apt/src/repositories/standard.rs | 14 ++------------ proxmox-apt/tests/repositories.rs | 6 ++---- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/proxmox-apt-api-types/src/lib.rs b/proxmox-apt-api-types/src/lib.rs index d0ca05d9..2ac9e392 100644 --- a/proxmox-apt-api-types/src/lib.rs +++ b/proxmox-apt-api-types/src/lib.rs @@ -392,9 +392,6 @@ pub enum APTRepositoryHandle { CephSquidNoSubscription, /// Ceph Squid test repository. CephSquidTest, - /// Check install - #[serde(rename = "checkinstall")] - CheckInstall, /// Debug info #[serde(rename = "debuginfo")] DebugInfo, diff --git a/proxmox-apt/src/repositories/mod.rs b/proxmox-apt/src/repositories/mod.rs index 3d5d5b90..1af20115 100644 --- a/proxmox-apt/src/repositories/mod.rs +++ b/proxmox-apt/src/repositories/mod.rs @@ -109,7 +109,6 @@ pub fn standard_repositories( ]; #[cfg(feature = "alt-linux")] let mut result = vec![ - APTStandardRepository::from_handle(APTRepositoryHandle::CheckInstall), APTStandardRepository::from_handle(APTRepositoryHandle::Classic), APTStandardRepository::from_handle(APTRepositoryHandle::DebugInfo), APTStandardRepository::from_handle(APTRepositoryHandle::GostCrypto), diff --git a/proxmox-apt/src/repositories/standard.rs b/proxmox-apt/src/repositories/standard.rs index 25f09eca..34b4dd60 100644 --- a/proxmox-apt/src/repositories/standard.rs +++ b/proxmox-apt/src/repositories/standard.rs @@ -86,10 +86,6 @@ impl APTRepositoryHandleImpl for APTRepositoryHandle { "This repository contains the Ceph Squid packages before they are moved to the \ main repository." } - APTRepositoryHandle::CheckInstall => { - "The repository contains check install information for binary \ - executables and libraries." - } APTRepositoryHandle::Classic => { "The repository contains binary executables and libraries." } @@ -119,7 +115,7 @@ impl APTRepositoryHandleImpl for APTRepositoryHandle { APTRepositoryHandle::CephSquidEnterprise => "Ceph Squid Enterprise", APTRepositoryHandle::CephSquidNoSubscription => "Ceph Squid No-Subscription", APTRepositoryHandle::CephSquidTest => "Ceph Squid Test", - APTRepositoryHandle::CheckInstall => "checkinstall", + APTRepositoryHandle::Classic => "classic", APTRepositoryHandle::DebugInfo => "debuginfo", APTRepositoryHandle::GostCrypto => "gostcrypto", @@ -143,8 +139,7 @@ impl APTRepositoryHandleImpl for APTRepositoryHandle { | APTRepositoryHandle::CephSquidEnterprise | APTRepositoryHandle::CephSquidNoSubscription | APTRepositoryHandle::CephSquidTest => "/etc/apt/sources.list.d/ceph.list".to_string(), - APTRepositoryHandle::CheckInstall - | APTRepositoryHandle::Classic + APTRepositoryHandle::Classic | APTRepositoryHandle::DebugInfo | APTRepositoryHandle::GostCrypto => "/etc/apt/sources.list".to_string(), } @@ -230,11 +225,6 @@ impl APTRepositoryHandleImpl for APTRepositoryHandle { vec!["http://download.proxmox.com/debian/ceph-squid".to_string()], "test".to_string(), ), - APTRepositoryHandle::CheckInstall => ( - APTRepositoryPackageType::Rpm, - vec!["http://ftp.altlinux.org/pub/distributions/ALTLinux".to_string()], - "checkinstall".to_string(), - ), APTRepositoryHandle::Classic => ( APTRepositoryPackageType::Rpm, vec![ diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs index d7b403b6..a921f8be 100644 --- a/proxmox-apt/tests/repositories.rs +++ b/proxmox-apt/tests/repositories.rs @@ -769,7 +769,6 @@ fn test_standard_repositories() -> Result<(), Error> { let read_dir = test_dir.join("sources.list.d"); let mut expected = vec![ - APTStandardRepository::from_handle(APTRepositoryHandle::CheckInstall), APTStandardRepository::from_handle(APTRepositoryHandle::Classic), APTStandardRepository::from_handle(APTRepositoryHandle::DebugInfo), APTStandardRepository::from_handle(APTRepositoryHandle::GostCrypto), @@ -779,11 +778,11 @@ fn test_standard_repositories() -> Result<(), Error> { let mut file = APTRepositoryFile::new(&alt_list)?.unwrap(); file.parse()?; - expected[1].status = Some(true); + expected[0].status = Some(true); let std_repos = standard_repositories(&[file], "pve", ALTBranchID::Sisyphus); - assert_eq!(std_repos, &expected[0..=3]); + assert_eq!(std_repos, &expected[0..=2]); let yandex_list = read_dir.join("yandex.list"); let mut file = APTRepositoryFile::new(&yandex_list)?.unwrap(); @@ -792,7 +791,6 @@ fn test_standard_repositories() -> Result<(), Error> { expected[0].status = None; expected[1].status = None; expected[2].status = None; - expected[3].status = None; let std_repos = standard_repositories(&[file], "pve", ALTBranchID::Sisyphus);