diff options
author | Erich Eckner <git@eckner.net> | 2024-07-15 21:32:10 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2024-07-15 21:32:10 +0200 |
commit | 12c92f352a4491c91df9950190eda5d7249a1ec9 (patch) | |
tree | 7e036b0053b2ce94f264908c9e029858b3fa736a | |
parent | 139ccaed77dbb537f2d160f1e501160072278d56 (diff) | |
download | archlinuxewe-12c92f352a4491c91df9950190eda5d7249a1ec9.tar.xz |
Reapply "run docker sequentially per package"
This reverts commit 00c0a70257ba2a6fa920c58cec299d7514903ed9.
apparently, the problem was somewhere else
-rwxr-xr-x | build-all-with-docker | 61 |
1 files changed, 23 insertions, 38 deletions
diff --git a/build-all-with-docker b/build-all-with-docker index 1676d9c65..fbccd3fd8 100755 --- a/build-all-with-docker +++ b/build-all-with-docker @@ -24,47 +24,32 @@ if [ -n "$(git status --porcelain)" ]; then exit 1 fi -ids=$( - for pkg in */PKGBUILD; do - cd "${pkg%/PKGBUILD}" - ../addPkgbuildPatch add - docker run -d -v .:/build arch-build:latest - docker run -d -v .:/build artix-build:latest - cd .. - done \ - | tee /dev/stderr -) +ids=() -check_and_commit_package_updates() { - [ -z "$(git status --porcelain)" ] && return - for pkg in $( - git status --porcelain \ - | sed ' - s@^.. @@ - s@/[^/]\+$@@ - ' \ - | grep -vxFf <( - docker ps --format '{{.Mounts}}' --no-trunc \ - | sed 's@^.*/@@' - ) - ); do - if ! [ -d "$pkg" ]; then - >&2 echo "$pwd is not a directory" - continue - fi - cd "$pkg" +for pkg in */PKGBUILD; do + cd "${pkg%/PKGBUILD}" + ( + ../addPkgbuildPatch add + docker run -v .:/build arch-build:latest + docker run -v .:/build arch32-i486-build + docker run -v .:/build arch32-i686-build + docker run -v .:/build arch32-pentium4-build + docker run -v .:/build artix-build:latest ../addPkgbuildPatch del - [ -n "$(git status --porcelain -- .)" ] \ - && ../commit-package -a \ - && git push - cd .. - done -} + [ -n "$(git status --porcelain -- PKGBUILD)" ] && ../commit-package -a && git push + ) & + ids[${#ids[@]}]=$! + cd .. +done -while docker ps --no-trunc | grep -wF "${ids}"; do +while [ "${#ids[@]}" -gt 0 ]; do sleep 10 - check_and_commit_package_updates + ids=( + $( + ls /proc \ + | grep -xFf <(printf '%s\n' "${ids[@]}") \ + | tee /dev/stderr + ) + ) date done - -check_and_commit_package_updates |