Remove apt-get wrap
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 15 Feb 2017 15:21:06 +0000 (07:21 -0800)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 15 Feb 2017 15:21:06 +0000 (07:21 -0800)
Something is off in the wrap as it doesn't handle errors very well or
something it's relying on isn't installed on a base system. Since it's
currently causing packer builds to fail, it's getting removed until it
can be trouble-shot better

Change-Id: I3db6fd1c54279d36682d5cecd2f05a96ce58702a
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
packer/provision/baseline.sh

index 99e7460..ca79868 100644 (file)
@@ -115,29 +115,6 @@ Dpkg::Options {
 
 EOF
 
-    # Wrap apt-get to wait for the lock to become available for operation
-    # http://askubuntu.com/questions/132059/how-to-make-a-package-manager-wait-if-another-instance-of-apt-is-running
-    cat << 'EOF' >> /usr/local/bin/apt-get
-#!/bin/bash
-
-i=0
-tput sc
-while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
-    case $(($i % 4)) in
-        0 ) j="-" ;;
-        1 ) j="\\" ;;
-        2 ) j="|" ;;
-        3 ) j="/" ;;
-    esac
-    tput rc
-    echo -en "\r[$j] Waiting for other software managers to finish..."
-    sleep 0.5
-    ((i=i+1))
-done
-
-/usr/bin/apt-get "$@"
-
-EOF
     chmod +x /usr/local/bin/apt-get
 
     echo "---> Updating operating system"