]> 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 6e81d14b334f1b66b652883cec588b2f5156d9ee..e07b4938dfd47a5eabcda2d3cf46f7f522b34d4d 100755 (executable)
@@ -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