Skip to content

Commit 43e52cb

Browse files
committed
Add files feature to agama-utils making curl optional
Due to a dependency chain agama-network pulls in curl via agama-network -> agama-utils -> agama-transfer -> curl. With this comes a dependency on openssl which unfortunately for wicked2nm is a problem, because it fails to build on older SLE 15 SPs. To circumvent this I added a default feature that excludes the affected parts from agama-network so it doesn't depend on agama-transfer. This should have no actual impact on agama itself.
1 parent 9fa2aa3 commit 43e52cb

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

rust/agama-network/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rust-version.workspace = true
55
edition.workspace = true
66

77
[dependencies]
8-
agama-utils = { path = "../agama-utils" }
8+
agama-utils = { path = "../agama-utils", default-features = false }
99
anyhow = "1.0.98"
1010
async-trait = "0.1.88"
1111
cidr = { version = "0.3.1", features = ["serde"] }

rust/agama-utils/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ version = "0.1.0"
44
rust-version.workspace = true
55
edition.workspace = true
66

7+
[features]
8+
default = ["files"]
9+
files = ["dep:agama-transfer"]
10+
711
[dependencies]
812
agama-locale-data = { path = "../agama-locale-data" }
9-
agama-transfer = { path = "../agama-transfer" }
13+
agama-transfer = { path = "../agama-transfer", optional = true }
1014
async-trait = "0.1.89"
1115
camino = "1.2.1"
1216
serde = { version = "1.0.228", features = ["derive"] }

rust/agama-utils/src/api.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ pub use issue::{Issue, IssueMap, IssueWithScope};
3939
mod system_info;
4040
pub use system_info::SystemInfo;
4141

42+
#[cfg(feature = "files")]
4243
pub mod config;
44+
#[cfg(feature = "files")]
4345
pub use config::Config;
4446

4547
mod raw_config;
4648
pub use raw_config::RawConfig;
4749

50+
#[cfg(feature = "files")]
4851
pub mod patch;
52+
#[cfg(feature = "files")]
4953
pub use patch::Patch;
5054

5155
mod proposal;
@@ -55,6 +59,7 @@ mod action;
5559
pub use {action::Action, action::FinishMethod};
5660

5761
pub mod bootloader;
62+
#[cfg(feature = "files")]
5863
pub mod files;
5964
pub mod hostname;
6065
pub mod iscsi;

0 commit comments

Comments
 (0)