aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-11-17 12:07:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-11-17 12:07:16 +0300
commiteb8e148edcfae43ec33f04a7aa647a9fa07cfb9f (patch)
treeaf09730492f3f9bad1b376e96f500c97495392e1
parent069e21c82557fa45ce59e340a5aaf6ef691b89b5 (diff)
Adapt to bpkg_util_pkg_find_archive() result fields reorder
-rw-r--r--brep/handler/submit/submit-git.bash.in6
-rw-r--r--brep/handler/submit/submit-pub.in6
2 files changed, 6 insertions, 6 deletions
diff --git a/brep/handler/submit/submit-git.bash.in b/brep/handler/submit/submit-git.bash.in
index 983d7b5..cc679c8 100644
--- a/brep/handler/submit/submit-git.bash.in
+++ b/brep/handler/submit/submit-git.bash.in
@@ -82,10 +82,10 @@ function check_package_duplicate () # <name> <version> <repo-dir>
'p=($(run pkg_find_archive "$nam-$ver.*" "$rep/${sections[$s]}"))'
if [ "${#p[@]}" -ne 0 ]; then
- local n="${p[0]}"
- local v="${p[1]}"
+ local n="${p[1]}"
+ local v="${p[2]}"
- trace "found: $n/$v in ${p[3]}"
+ trace "found: $n/$v in ${p[0]}"
if [ "$n" == "$nam" ]; then
exit_with_manifest 422 "duplicate submission"
diff --git a/brep/handler/submit/submit-pub.in b/brep/handler/submit/submit-pub.in
index d5f5c4e..ccb701d 100644
--- a/brep/handler/submit/submit-pub.in
+++ b/brep/handler/submit/submit-pub.in
@@ -300,10 +300,10 @@ trap exit_trap EXIT
IFS=$'\n' eval 'p=($(run pkg_find_archive "$name-$version.*" "$repo_old/1"))'
if [ "${#p[@]}" -ne 0 ]; then
- n="${p[0]}"
- v="${p[1]}"
+ n="${p[1]}"
+ v="${p[2]}"
- trace "found: $n/$v in ${p[3]}"
+ trace "found: $n/$v in ${p[0]}"
if [ "$n" == "$name" ]; then
exit_with_manifest 422 "duplicate submission"