Fix compose and advanced commands CLI integration
- Fix ComposeSubcommands enum to match actual implementation - Add proper subcommand handling for compose, db, and override commands - Update main.rs to correctly dispatch subcommands with arguments - Compose command now properly shows all subcommands (tree, install, postprocess, etc.) - Db command now properly shows all subcommands (list, info, search) - Override command now properly shows all subcommands (add, remove, list) - All advanced commands now work correctly with proper argument parsing - Fixes 'Not yet implemented' error for compose command - Commands now properly execute their intended functionality
This commit is contained in:
parent
3e40c891cc
commit
bcf7183107
2 changed files with 171 additions and 17 deletions
81
src/cli.rs
81
src/cli.rs
|
|
@ -363,12 +363,71 @@ pub struct ComposeArgs {
|
|||
|
||||
#[derive(Subcommand)]
|
||||
pub enum ComposeSubcommands {
|
||||
/// Compose a new tree
|
||||
Tree { target: String },
|
||||
/// Compose a container
|
||||
Container { target: String },
|
||||
/// Compose a bootable image
|
||||
Bootable { target: String },
|
||||
/// Process a treefile and commit to OSTree repository
|
||||
Tree {
|
||||
/// Path to treefile
|
||||
#[arg(long)]
|
||||
treefile: Option<String>,
|
||||
/// Output path
|
||||
#[arg(long)]
|
||||
output: Option<String>,
|
||||
/// Comma-separated list of packages
|
||||
#[arg(long)]
|
||||
packages: Option<String>,
|
||||
/// Target directory or repository
|
||||
target: Option<String>,
|
||||
},
|
||||
/// Install packages into a target path
|
||||
Install {
|
||||
/// Output path for installation
|
||||
#[arg(long)]
|
||||
output: String,
|
||||
/// Packages to install
|
||||
packages: Vec<String>,
|
||||
},
|
||||
/// Perform final postprocessing on an installation root
|
||||
Postprocess {
|
||||
/// Target path to postprocess
|
||||
target: String,
|
||||
},
|
||||
/// Commit a target path to an OSTree repository
|
||||
Commit {
|
||||
/// Target path to commit
|
||||
target: String,
|
||||
/// Repository path
|
||||
#[arg(long)]
|
||||
repo: Option<String>,
|
||||
},
|
||||
/// Download packages guaranteed to depsolve
|
||||
Extensions {
|
||||
/// Base tree reference
|
||||
base: String,
|
||||
/// Output directory
|
||||
#[arg(long)]
|
||||
output: Option<String>,
|
||||
},
|
||||
/// Generate a reproducible container image
|
||||
Image {
|
||||
/// Path to treefile
|
||||
#[arg(long)]
|
||||
treefile: Option<String>,
|
||||
/// Output path for image
|
||||
#[arg(long)]
|
||||
output: Option<String>,
|
||||
/// Target directory
|
||||
target: Option<String>,
|
||||
},
|
||||
/// Generate a root filesystem tree from a treefile
|
||||
Rootfs {
|
||||
/// Path to treefile
|
||||
#[arg(long)]
|
||||
treefile: Option<String>,
|
||||
/// Output path for rootfs
|
||||
#[arg(long)]
|
||||
output: Option<String>,
|
||||
/// Target directory
|
||||
target: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
|
|
@ -382,9 +441,15 @@ pub enum DbSubcommands {
|
|||
/// List packages
|
||||
List,
|
||||
/// Show package info
|
||||
Info { package: String },
|
||||
Info {
|
||||
/// Package name to get info for
|
||||
package: String
|
||||
},
|
||||
/// Search packages
|
||||
Search { query: String },
|
||||
Search {
|
||||
/// Search query
|
||||
query: String
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue