fix: cub production recipe, serde_derive import, minor cleanup
- recipe: use cargo install for proper binary installation - aur.rs: serde_derive for explicit derive path - main.rs: final noconfirm/force flow cleanup
This commit is contained in:
@@ -12,7 +12,7 @@ name = "cub"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
cub-lib = { path = "../cub-lib" }
|
||||
cub-lib = { path = "../cub-lib", default-features = false }
|
||||
cub-tui = { path = "../cub-tui", optional = true }
|
||||
redox-pkg = { git = "https://gitlab.redox-os.org/redox-os/pkgutils.git", default-features = false, features = ["indicatif"] }
|
||||
clap = { workspace = true }
|
||||
@@ -22,5 +22,6 @@ tempfile = "3"
|
||||
termion = "4.0.6"
|
||||
|
||||
[features]
|
||||
default = ["tui"]
|
||||
default = ["full", "tui"]
|
||||
full = ["cub-lib/full"]
|
||||
tui = ["cub-tui"]
|
||||
|
||||
@@ -65,11 +65,31 @@ impl PackageCreator {
|
||||
output_path: &Path,
|
||||
secret_key_path: &Path,
|
||||
) -> Result<(), CubError> {
|
||||
cub::package::PackageCreator::create_from_stage(stage_dir, output_path, secret_key_path)
|
||||
#[cfg(feature = "full")]
|
||||
{
|
||||
cub::package::PackageCreator::create_from_stage(stage_dir, output_path, secret_key_path)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "full"))]
|
||||
{
|
||||
let _ = (stage_dir, output_path, secret_key_path);
|
||||
Err(CubError::PackageNotFound(
|
||||
"pkgar creation support is disabled in this build".into(),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn generate_package_toml(rbpkg: &RbPkgBuild) -> String {
|
||||
cub::package::PackageCreator::generate_package_toml(rbpkg)
|
||||
#[cfg(feature = "full")]
|
||||
{
|
||||
cub::package::PackageCreator::generate_package_toml(rbpkg)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "full"))]
|
||||
{
|
||||
let _ = rbpkg;
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use serde::Deserialize;
|
||||
use serde_derive::Deserialize;
|
||||
|
||||
use crate::error::CubError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user