From b1888e516c9c9d750726318227bf69856ec91b8b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 31 Aug 2018 21:41:53 +0300 Subject: Add ci-load --- brep/handler/submit/submit-dir.in | 2 +- brep/handler/submit/submit-git.bash.in | 11 ++++------- brep/handler/submit/submit-git.in | 2 +- brep/handler/submit/submit.bash.in | 1 + 4 files changed, 7 insertions(+), 9 deletions(-) (limited to 'brep/handler/submit') diff --git a/brep/handler/submit/submit-dir.in b/brep/handler/submit/submit-dir.in index bda0bf8..685cf06 100644 --- a/brep/handler/submit/submit-dir.in +++ b/brep/handler/submit/submit-dir.in @@ -99,7 +99,7 @@ if [ -z "$project" ]; then fi if [ -n "$simulate" ]; then - rm -r "$data_dir" + run rm -r "$data_dir" trace "$name/$version submission is simulated" else trace "$name/$version submission is queued" diff --git a/brep/handler/submit/submit-git.bash.in b/brep/handler/submit/submit-git.bash.in index c77f18d..b1bb357 100644 --- a/brep/handler/submit/submit-git.bash.in +++ b/brep/handler/submit/submit-git.bash.in @@ -127,10 +127,7 @@ function repository_base () # { # First, strip the URL query part, then component. # - sed -n \ --e 's%^\([^?]*\).*$%\1%' \ --e 's%^\(.*/\)[^/]\{1,\}/\{0,1\}$%\1%p' \ -<<<"$1" + sed -n -r -e 's%^([^?]*).*$%\1%' -e 's%^(.*/)[^/]+/?$%\1%p' <<<"$1" } # Authenticate the project name owner. Make sure that the control manifest @@ -296,7 +293,7 @@ function auth_package_unknown () # # function url_scheme () # { - sed -n -e 's%^\(.*\)://.*$%\L\1%p' <<<"$1" + sed -n -re 's%^(.*)://.*$%\L\1%p' <<<"$1" } # Check that the repository properly responds to the probing request before @@ -320,8 +317,8 @@ function check_connectivity () # if [ "$s" == "http" -o "$s" == "https" ]; then local u q - u="$(sed -n -e 's%^\([^?]*\).*$%\1%p' <<<"$url")" # Strips query part. - q="$(sed -n -e 's%^[^?]*\(.*\)$%\1%p' <<<"$url")" # Query part. + u="$(sed -n -re 's%^([^?]*).*$%\1%p' <<<"$url")" # Strips query part. + q="$(sed -n -re 's%^[^?]*(.*)$%\1%p' <<<"$url")" # Query part. if [ -z "$q" ]; then u="$u/info/refs?service=git-upload-pack" diff --git a/brep/handler/submit/submit-git.in b/brep/handler/submit/submit-git.in index a403377..bc8ecf0 100644 --- a/brep/handler/submit/submit-git.in +++ b/brep/handler/submit/submit-git.in @@ -387,7 +387,7 @@ function git_add () # ... run git -C "$d" add $gvo "$@" >&2 } -# Dor now we make 10 re-tries to add the package and push to target. Push can +# For now we make 10 re-tries to add the package and push to target. Push can # fail due to the target-to-reference information move race (see the above # notes for details) or because concurrent submissions. We may want to make it # configurable in the future. diff --git a/brep/handler/submit/submit.bash.in b/brep/handler/submit/submit.bash.in index 38a4e06..8ea510f 100644 --- a/brep/handler/submit/submit.bash.in +++ b/brep/handler/submit/submit.bash.in @@ -49,6 +49,7 @@ function extract_package_manifest () # local man="$2" if ! run_silent bpkg pkg-verify --manifest "$arc" >"$man"; then + # Perform the sanity check to make sure that bpkg is runnable. # if ! run bpkg --version >/dev/null; then -- cgit v1.1