diff --git a/sub_scripts/launcher.sh b/sub_scripts/launcher.sh index c5b3e3f..6e9b2e3 100755 --- a/sub_scripts/launcher.sh +++ b/sub_scripts/launcher.sh @@ -296,16 +296,21 @@ $(cat "$script_dir/sub_scripts/Build_lxc.log")" COPY_LOG 1 # Wait for apt to be available before the test. + apt_lock=0 for try in `seq 1 17` do # Check if /var/lib/dpkg/lock is used by another process if sudo lxc-attach -n $lxc_name -- lsof /var/lib/dpkg/lock > /dev/null then echo "apt is already in use..." + apt_lock=1 # Sleep an exponential time at each round sleep $(( try * try )) fi done + if [ $apt_lock -eq 1 ]; then + echo "apt has released its lock." + fi # Copy the package into the container. rsync -rq --delete "$package_path" "$lxc_name": >> "$test_result" 2>&1