Commit 01150ad18812155bf2c4ede82fca3e334eef3b31

Thomas de Grivel 2023-02-18T17:52:35

wip ci

diff --git a/share/shpkg/shpkg.subr b/share/shpkg/shpkg.subr
index 0a6d86d..c6cec6a 100644
--- a/share/shpkg/shpkg.subr
+++ b/share/shpkg/shpkg.subr
@@ -948,9 +948,7 @@ shpkg_ci_main () {
         else
             # run shpkg upgrade
             ( . "${SHPKG_REPO_BUILD_DIR}/etc/shpkg/profile"
-              verbose -n 2 shpkg upgrade "${SHPKG_REPO}"
-              if ! ( . "${SHPKG_REPO_BUILD_DIR}/share/shpkg/shpkg.subr";
-                     shpkg_upgrade "${SHPKG_REPO}"; ); then
+              if ! verbose 2 shpkg upgrade "${SHPKG_REPO}"; then
                   shpkg_ci_status_ko_grep "^${SHPKG_REPO}[.]"
               fi; )
             if verbose 1 cp -p "${SHPKG_REPO_BUILD_DIR}/var/log/shpkg/tags/${SHPKG_REPO}".*.log "${SHPKG_CI_LOG_DIR}"; then
@@ -960,11 +958,9 @@ shpkg_ci_main () {
         fi
         ( verbose 2 shpkg_bootstrap -f "${SHPKG_REPO_BUILD_DIR}"; )
         ( . "${SHPKG_REPO_BUILD_DIR}/etc/shpkg/profile"
-          verbose -n 2 shpkg install "${SHPKG_REPO}"
-          if ! ( . "${SHPKG_REPO_BUILD_DIR}/share/shpkg/shpkg.subr";
-                 shpkg_install "${SHPKG_REPO}"; ); then
-              exit 1
-          fi; )
+          if ! verbose 2 shpkg install "${SHPKG_REPO}"; then
+              shpkg_ci_status_ko_grep "^${SHPKG_REPO}[.]"
+          fi ; )
         verbose 2 shpkg_ci_status "${SHPKG_REPO}.ci.status" ok
         verbose 2 shpkg_ci_status "${SHPKG_REPO}.ci.branch_${SHPKG_REPO_GIT_BRANCH}.status" ok
         verbose 2 shpkg_ci_status "${SHPKG_REPO}.ci.commit_${SHPKG_REPO_HASH}.status" ok
@@ -1032,13 +1028,13 @@ shpkg_ci_status_trap () {
     fi
 }
 
-shpkg_ci_status_trap_grep () {
+shpkg_ci_status_ko_grep () {
     if [ -f "${SHPKG_CI_RUNNING}" ]; then
         for F in $(grep "$1" "${SHPKG_CI_RUNNING}"); do
             SHPKG_CI_STATUS_FILE="${SHPKG_CI_STATUS_DIR}/$F"
             SHPKG_CI_STATUS="$(cat "${SHPKG_CI_STATUS_FILE}")"
             if ! [ "x${SHPKG_CI_STATUS}" = "xrunning" ]; then
-                err 1 "shpkg_ci_status_trap: status is ${SHPKG_CI_STATUS}"
+                err 1 "shpkg_ci_status_ko_grep: status is ${SHPKG_CI_STATUS}"
             fi
             verbose -n 1 "echo ko > '${SHPKG_CI_STATUS_FILE}'"
             echo ko > "${SHPKG_CI_STATUS_FILE}"