]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - travis-ci/managers/fedora.sh
travis: wait for the container to fully boot up
[thirdparty/systemd.git] / travis-ci / managers / fedora.sh
index 38cb3d3158454a604890fd07bab79a68a0108486..e07b4938dfd47a5eabcda2d3cf46f7f522b34d4d 100755 (executable)
@@ -16,7 +16,7 @@ DOCKER_EXEC="${DOCKER_EXEC:-docker exec -it $CONT_NAME}"
 DOCKER_RUN="${DOCKER_RUN:-docker run}"
 REPO_ROOT="${REPO_ROOT:-$PWD}"
 ADDITIONAL_DEPS=(dnf-plugins-core
-                 python2 iputils
+                 jq iputils
                  hostname libasan
                  python3-pyparsing
                  python3-evdev
@@ -44,8 +44,10 @@ for phase in "${PHASES[@]}"; do
             $DOCKER_RUN -v $REPO_ROOT:/build:rw \
                         -w /build --privileged=true --name $CONT_NAME \
                         -dit --net=host fedora:$FEDORA_RELEASE /sbin/init
-            # Beautiful workaround for Fedora's version of Docker
-            sleep 1
+            # Wait for the container to properly boot up, otherwise we were
+            # running following dnf commands during the initializing/starting
+            # (early/late bootup) phase, which caused nasty race conditions
+            $DOCKER_EXEC bash -c 'systemctl is-system-running --wait || :'
             $DOCKER_EXEC dnf makecache
             # Install necessary build/test requirements
             $DOCKER_EXEC dnf -y --exclude selinux-policy\* upgrade