From 7af8a1b9b3180da54e2c9505228ad722db44ca27 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 24 Jun 2015 05:51:54 -0400 Subject: [PATCH] only soft enforce requirements not in projects.txt We're adding the ability to have devstack plugins, which should be much more free to require new things not in global requirements. Our old thinking of locking down all the requirements doesn't really work in a plugin model. Instead, if the project is in projects.txt, continue with the old behavior. If it is not, do a soft update (update all the requirements we know about, leave the ones we don't). This was previously the SOFT requirements update mode, but now it will just be the default. Change-Id: Ic0c6e01a6d7613d712ac9e7e4a378cc3a8ce75e6 --- inc/python | 16 ++++++---------- stackrc | 11 ----------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/inc/python b/inc/python index e3c5e61dd2..07a811e8c3 100644 --- a/inc/python +++ b/inc/python @@ -216,18 +216,14 @@ function setup_package_with_req_sync { local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed") if [[ $update_requirements != "changed" ]]; then - if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then - if is_in_projects_txt $project_dir; then - (cd $REQUIREMENTS_DIR; \ - ./.venv/bin/python update.py $project_dir) - else - # soft update projects not found in requirements project.txt - (cd $REQUIREMENTS_DIR; \ - ./.venv/bin/python update.py -s $project_dir) - fi - else + if is_in_projects_txt $project_dir; then (cd $REQUIREMENTS_DIR; \ ./.venv/bin/python update.py $project_dir) + else + # soft update projects not found in requirements project.txt + echo "$project_dir not a constrained repository, soft enforcing requirements" + (cd $REQUIREMENTS_DIR; \ + ./.venv/bin/python update.py -s $project_dir) fi fi diff --git a/stackrc b/stackrc index 1ac1338f2c..9cd9c053d7 100644 --- a/stackrc +++ b/stackrc @@ -149,17 +149,6 @@ DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING) # Zero disables timeouts GIT_TIMEOUT=${GIT_TIMEOUT:-0} -# Requirements enforcing mode -# -# - strict (default) : ensure all project requirements files match -# what's in global requirements. -# -# - soft : enforce requirements on everything in -# requirements/projects.txt, but do soft updates on all other -# repositories (i.e. sync versions for requirements that are in g-r, -# but pass through any extras) -REQUIREMENTS_MODE=${REQUIREMENTS_MODE:-strict} - # Repositories # ------------