Add RECLONE support for ovs

When user sets "RECLONE=True" in local.conf, all components need
to be cloned. This flag is not handled in the ovs script, and when
the repo exists - it won't be refreshed.

Change-Id: I2831f77271880c5964627673cbc0a62c211a045a
This commit is contained in:
chen-li 2016-02-20 00:46:16 +08:00 committed by li,chen
parent 8582373d61
commit 0de0034ed1
1 changed files with 9 additions and 5 deletions

View File

@ -51,13 +51,17 @@ function compile_ovs {
localstatedir="--localstatedir=$localstatedir"
fi
cd $DEST
if [ ! -d $OVS_REPO_NAME ] ; then
git clone $OVS_REPO
cd $OVS_REPO_NAME
OVS_DIR=$DEST/$OVS_REPO_NAME
if [ ! -d $OVS_DIR ] ; then
# We can't use git_clone here because we want to ignore ERROR_ON_CLONE
git_timed clone $OVS_REPO $OVS_DIR
cd $OVS_DIR
git checkout $OVS_BRANCH
else
cd $OVS_REPO_NAME
# Even though the directory already exists, call git_clone to update it
# if needed based on the RECLONE option
git_clone $OVS_REPO $OVS_DIR $OVS_BRANCH
cd $OVS_DIR
fi
# TODO: Can you create package list files like you can inside devstack?