diff --git a/src/main.rs b/src/main.rs index ced2016..7f298ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -136,6 +136,10 @@ struct Args { /// Reproducible mode: Output exact git references for git projects #[structopt(short = "R")] reproducible: bool, + + /// Legacy Overrides: Use legacy override syntax + #[structopt(short = "l", long = "--legacy-overrides")] + legacy_overrides: bool, } #[derive(StructOpt, Debug)] @@ -356,9 +360,14 @@ fn real_main(options: Args, config: &mut Config) -> CliResult { // if this is not a tag we need to include some data about the version in PV so that // the sstate cache remains valid let git_srcpv = if !project_repo.tag && project_repo.rev.len() > 10 { + let mut pv_append_key = "PV:append"; + // Override PV override with legacy syntax if flagged + if options.legacy_overrides { + pv_append_key = "PV_append"; + } // we should be using ${SRCPV} here but due to a bitbake bug we cannot. see: // https://github.com/meta-rust/meta-rust/issues/136 - format!("PV:append = \".AUTOINC+{}\"", &project_repo.rev[..10]) + format!("{} = \".AUTOINC+{}\"", pv_append_key, &project_repo.rev[..10]) } else { // its a tag so nothing needed "".into()