arch variants and better signing - #29
Conversation
| BuildTarget::Source(source_args) => (&source_args.build, None, None, true), | ||
| }; | ||
|
|
||
| let config_driver = load_config( |
There was a problem hiding this comment.
this looks somewhat as if we will be loading the config twice now. Initially here and then another time down the line when e.g. resolving the settings for the drivers themselves.
Probably the BuildIntentInput should already receive a fully resolved config object instead of the config file path (other subcommands should be handled similarly). That way we can avoid that duplication where we might resolve configs differently in different places.
| #[arg( | ||
| long, | ||
| action = clap::ArgAction::SetTrue, | ||
| help = "Sign the resulting .changes/.dsc with debsign after building. Defaults to the 'sign_package' setting in the config file (false if unset)." | ||
| num_args = 0..=1, | ||
| default_missing_value = "true", | ||
| action = clap::ArgAction::Set, | ||
| overrides_with = "no_sign", | ||
| help = "Sign the resulting .changes/.dsc with debsign after building. Defaults to the 'sign.source' setting in the config file (false if unset)." | ||
| )] | ||
| pub sign: Option<bool>, | ||
|
|
||
| #[arg( | ||
| long, | ||
| action = clap::ArgAction::SetFalse, | ||
| help = "Do not sign the resulting .changes/.dsc, overriding a 'sign_package = true' default in the config file." | ||
| num_args = 0..=1, | ||
| default_missing_value = "true", | ||
| action = clap::ArgAction::Set, | ||
| help = "Do not sign the resulting .changes/.dsc, overriding a 'sign.source = true' default in the config file." | ||
| )] | ||
| pub no_sign: Option<bool>, |
There was a problem hiding this comment.
Defining these cli options this way looks a bit weird, is there no other way with clap creating these --no-sign / --sign pairs automatically?
Also we should not be passing both flags to further program stages as that is a very weird api. This combination is something specific to the cli. Any signing logic should just see one boolean, whether to sing or not to sign.
There was a problem hiding this comment.
i tried, but i couldn't find a better way to have tristate flags: no value, and 2 override values - no value is used so we can keep the config setting. also this supports sign=false, which for me is more intuitive than no-sign
host_arch_variantbuilding for amd64v3 architecture variant of amd64