Ray,

The reason is because vagrant produces a bunch of 'issues' when trying to
build from a 'mounted' share.

When running vagrant, /vpp gets mounted with where ever the source is
*outside* the vagrant VM

Once inside, if you try to build from /vpp, a variety of things can and do
break sadly :(

So we clone vpp again into the local-to-the-VM storage.

Does that answer your question?

Ed

On Tue, Dec 13, 2016 at 10:47 AM, Kinsella, Ray <ray.kinse...@intel.com>
wrote:

> Folks,
>
> Two QQ on clone.sh
> (https://git.fd.io/vpp/tree/build-root/vagrant/clone.sh)
>
> 1. Why are we re-cloning source already available in /vpp?
> 2. Why do we ssh to remote server on the third last line ?
> (this presumably hangs?).
>
> Ray K
>
>
> # Setup the vpp code
> cd ~vagrant/
> sudo -u vagrant mkdir git
> cd git/
> echo "SSH_AUTH_SOCK  $SSH_AUTH_SOCK x"
> chmod 777 $SSH_AUTH_SOCK
>
> CLONE_URL=`cd /vpp;git remote -v | grep origin |grep fetch |awk '{print
> $2}'`
> echo "CLONE_URL $CLONE_URL"
> echo $CLONE_URL | grep -q "^ssh:"
> if [ $? == 0 ]; then
>     SSH_HOST=`echo $CLONE_URL| awk -F/ '{print $3}'`
>     SSH_PORT=`echo $SSH_HOST| awk -F: '{print $2}'`
>     if [ -n $SSH_PORT ]; then
>         SSH_PORT="-p $SSH_PORT"
>     fi
>     SSH_HOST=`echo $SSH_HOST| awk -F: '{print $1}'`
>     echo "SSH_HOST $SSH_HOST"
>     echo "SSH_PORT $SSH_PORT"
>     sudo -HE -u vagrant ssh -oStrictHostKeyChecking=no -v $SSH_PORT
> $SSH_HOST
> fi
> sudo -HE -u vagrant git clone $CLONE_URL
> _______________________________________________
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
>
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to