diff --git a/src/main.rs b/src/main.rs index e022e97..1a115ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -355,16 +355,14 @@ fn main() { .arg(arg!(-a --arch "Target architecture").required(false)) .arg(arg!(-p --pocket "Build against dependencies from a specific distribution pocket (updates, security, proposed)").required(false) .long_help("Build against dependencies from a specific distribution pocket (e.g. updates, security, proposed).\nThe '-' suite will be enabled on archive sources when resolving build-dependencies.")) - .arg(arg!(--mirror "Resolve every package of the build from a specific mirror (base URL)").required(false) - .long_help("Build the chroot and resolve every package from the given base URL — a caching proxy or a chosen mirror on a pinned runner — instead of the distro default: the mirror is passed to mmdebstrap at bootstrap, so the chroot tarball's apt sources carry it and every apt inside the build follows.\nThe mirror must serve every suite and architecture the build resolves: the security pocket and, for cross builds, the target architecture's archive included. PPAs and other third-party sources are left alone. The tarball cache is keyed per mirror, so pinned and unpinned builds keep separate tarballs.")) + .arg(arg!(--mirror "Resolve every package of the build from the given base URL").required(false) + .long_help("Build the chroot and resolve every package from the given base URL instead of the distro default. The URL is passed to mmdebstrap at bootstrap, so the chroot's apt sources carry it and every apt in the build resolves from it.\nThe mirror must serve every suite and architecture the build resolves, the security pocket and cross-build archives included. The tarball cache is keyed per mirror, so pinned and unpinned builds keep separate tarballs.")) .arg(arg!(--ppa "Build the package adding a specific PPA for dependencies (can be specified multiple times)") .long_help("Build the package adding a specific PPA for dependencies. Can be specified multiple times.").required(false).action(clap::ArgAction::Append)) .arg(arg!(--inject "Inject a package into the build environment (can be specified multiple times)") .long_help("Inject a package into the build environment before build-dep. Can be a .deb file path, a package name from the archive, or a package from a previously added PPA. Can be specified multiple times.").required(false).action(clap::ArgAction::Append)) .arg(arg!(--cross "Cross-compile for target architecture (instead of qemu-binfmt)") .long_help("Cross-compile for target architecture (instead of using qemu-binfmt)\nNote that most packages cannot be cross-compiled").required(false)) - .arg(arg!(--mode "Change build mode [local]").required(false) - .long_help("Change build mode [local]\nDefault will chose depending on other parameters, don't provide if unsure")) .arg(arg!(-j --jobs "Number of parallel build jobs (default: number of CPUs available in the build context)").required(false)) .arg( clap::Arg::new("incremental") @@ -374,10 +372,9 @@ fn main() { .require_equals(false) .default_missing_value("") .help("Incremental build: fork a previous build record of this target and keep its staged tree") - .long_help("Incremental build: fork a previous build record of this target — at an unchanged changelog version and while the chroot tarball is unchanged, the base's staged tree is copied into a new record, so make recompiles only what changed.\nWithout a value, the newest successful record of the target (among the last five carrying a staged tree) is the base; with an ID (as shown by 'pkh deb list'), that exact record — a failed one is fine if its staged tree is.\nEvery --incremental run keeps its staged tree, success or failure, so the next one can fork it; a plain 'pkh deb' keeps only metadata and its build log (the chroot is per-run and always discarded)."), + .long_help("Incremental build: fork a previous build record of this target and keep its staged tree, so make recompiles only what changed. The base's staged tree carries over only while the changelog version and the chroot tarball are unchanged.\nWithout a value, the base is the newest successful record of the target among the last five carrying a staged tree. With an ID as shown by 'pkh deb list', that exact record. A failed record is fine as a base if its staged tree is still there.\nEvery --incremental run keeps its staged tree, success or failure, so the next run can fork it. A plain 'pkh deb' keeps only metadata and the build log."), ) - .arg(arg!(--"no-ccache" "Build without the shared ccache (escape hatch for kbuild-style rules that mishandle compiler shims)") - .long_help("Build without the shared ccache (its compiler PATH shim is skipped and no cache is mounted). Escape hatch for packages whose debian/rules mishandles a compiler shim, e.g. some kernel flavour configs.")) + .arg(arg!(--"no-ccache" "Build without the shared ccache").required(false)) .arg(arg!(--verbose "Show raw tool output instead of the live build view").required(false) .long_help("Show raw tool output instead of the live build view.\nAlso implied by RUST_LOG=debug for pkh's own logs.")) .subcommand( @@ -981,11 +978,6 @@ fn main() { .get_many::("inject") .map(|v| v.cloned().collect()) .unwrap_or_default(); - let mode: Option<&str> = sub_matches.get_one::("mode").map(|s| s.as_str()); - let mode: Option = match mode { - Some("local") => Some(pkh::deb::BuildMode::Local), - _ => None, - }; let verbose = sub_matches .get_one::("verbose") .copied() @@ -1033,7 +1025,6 @@ fn main() { mirror: sub_matches.get_one::("mirror").cloned(), cwd: Some(cwd.clone()), cross, - mode, ppa, inject, jobs,