From fc05ea19d9005cffaa461cf4f86131a001f88ca9 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Thu, 8 Feb 2024 01:15:48 +0100 Subject: fix(build): allow unstable repositories to override repo target This works around the fact that we are currently not auto detecting unstable repository targets while providing a stability layer option on the subcommand. Soften the --repo option rules by allowing unstable repositories to use that flag for building and releasing against the unstable repositories. This will be replaced in the near future by proper integration of target repository auto-detection that in aware of unstable repositories while providing a unstable stability layer options. Component: pkgctl build Component: pkgctl release Signed-off-by: Levente Polyak --- src/lib/build/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib/build/build.sh') diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh index 8e9a3bb..9bd1e5d 100644 --- a/src/lib/build/build.sh +++ b/src/lib/build/build.sh @@ -337,7 +337,12 @@ pkgctl_build() { # fail if an existing package specifies --repo if [[ -n "${repo}" ]] && [[ -n ${pkgrepo} ]]; then - die 'Using --repo for packages that exist in official repositories is disallowed' + # allow unstable to use --repo + if [[ ${pkgrepo} == *unstable ]]; then + repo=${pkgrepo} + else + die 'Using --repo for packages that exist in official repositories is disallowed' + fi fi # assign auto-detected target repository -- cgit v1.2.3-70-g09d2