From 0de0034ed1bda3e7702be40a4c16e841018b3470 Mon Sep 17 00:00:00 2001 From: chen-li Date: Sat, 20 Feb 2016 00:46:16 +0800 Subject: [PATCH] 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 --- devstack/lib/ovs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/devstack/lib/ovs b/devstack/lib/ovs index 3bd9520df4a..d722010250e 100644 --- a/devstack/lib/ovs +++ b/devstack/lib/ovs @@ -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?