pull,deb: add top-level --pocket option
- pull: select the pocket to download the source package from
- deb: build against dependencies from a specific pocket:
- local mode: enable '{series}-{pocket}' suite on archive sources
- cross mode: include the pocket suite in required repositories
This commit is contained in:
+10
-1
@@ -50,6 +50,7 @@ fn main() {
|
||||
.arg(arg!(-v --version <version> "Target package version").required(false))
|
||||
.arg(arg!(--archive "Only use the archive to download package source, not git").required(false))
|
||||
.arg(arg!(--ppa <ppa> "Download the package from a specific PPA").required(false))
|
||||
.arg(arg!(-p --pocket <pocket> "Target package distribution pocket (updates, security, proposed)").required(false))
|
||||
.arg(arg!(<package> "Target package")),
|
||||
)
|
||||
.subcommand(
|
||||
@@ -65,6 +66,8 @@ fn main() {
|
||||
.about("Build the source package into binary package (.deb)")
|
||||
.arg(arg!(-s --series <series> "Target distribution series").required(false))
|
||||
.arg(arg!(-a --arch <arch> "Target architecture").required(false))
|
||||
.arg(arg!(-p --pocket <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 '<series>-<pocket>' suite will be enabled on archive sources when resolving build-dependencies."))
|
||||
.arg(arg!(--ppa <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 <package> "Inject a package into the build environment (can be specified multiple times)")
|
||||
@@ -130,6 +133,10 @@ fn main() {
|
||||
let dist = sub_matches.get_one::<String>("dist").map(|s| s.as_str());
|
||||
let version = sub_matches.get_one::<String>("version").map(|s| s.as_str());
|
||||
let ppa = sub_matches.get_one::<String>("ppa").map(|s| s.as_str());
|
||||
let pocket = sub_matches
|
||||
.get_one::<String>("pocket")
|
||||
.map(|s| s.as_str())
|
||||
.unwrap_or("");
|
||||
let archive = sub_matches.get_one::<bool>("archive").unwrap_or(&false);
|
||||
|
||||
let (pb, progress_callback) = ui::create_progress_bar(&multi);
|
||||
@@ -151,7 +158,7 @@ fn main() {
|
||||
package,
|
||||
version,
|
||||
series,
|
||||
"",
|
||||
pocket,
|
||||
dist,
|
||||
base_url.as_deref(),
|
||||
Some(&progress_callback),
|
||||
@@ -251,6 +258,7 @@ fn main() {
|
||||
Some(("deb", sub_matches)) => {
|
||||
let cwd = current_dir_or_exit();
|
||||
let series = sub_matches.get_one::<String>("series").map(|s| s.as_str());
|
||||
let pocket = sub_matches.get_one::<String>("pocket").map(|s| s.as_str());
|
||||
let arch = sub_matches.get_one::<String>("arch").map(|s| s.as_str());
|
||||
let cross = sub_matches.get_one::<bool>("cross").unwrap_or(&false);
|
||||
let ppa: Vec<&str> = sub_matches
|
||||
@@ -281,6 +289,7 @@ fn main() {
|
||||
pkh::deb::build_binary_package(
|
||||
arch,
|
||||
series,
|
||||
pocket,
|
||||
Some(cwd.as_path()),
|
||||
*cross,
|
||||
mode,
|
||||
|
||||
Reference in New Issue
Block a user