in the gate, we actually need to *not* roll back the requirements,
otherwise tempest can wedge the world because it runs under tox.
Make a variable that we can set to false in the gate to ensure that
we don't roll back the requirements changes.
Change-Id: I2b842ecc3f6e8b917dd721729640000bd7e7fb78
| ... | ... |
@@ -1257,9 +1257,18 @@ function setup_develop() {
|
| 1257 | 1257 |
# ensure that further actions can do things like setup.py sdist |
| 1258 | 1258 |
safe_chown -R $STACK_USER $1/*.egg-info |
| 1259 | 1259 |
|
| 1260 |
- # Undo requirements changes, if we made them |
|
| 1261 |
- if [ $update_requirements -eq 0 ]; then |
|
| 1262 |
- (cd $project_dir && git reset --hard) |
|
| 1260 |
+ # We've just gone and possibly modified the user's source tree in an |
|
| 1261 |
+ # automated way, which is considered bad form if it's a development |
|
| 1262 |
+ # tree because we've screwed up their next git checkin. So undo it. |
|
| 1263 |
+ # |
|
| 1264 |
+ # However... there are some circumstances, like running in the gate |
|
| 1265 |
+ # where we really really want the overridden version to stick. So provide |
|
| 1266 |
+ # a variable that tells us whether or not we should UNDO the requirements |
|
| 1267 |
+ # changes (this will be set to False in the OpenStack ci gate) |
|
| 1268 |
+ if [ $UNDO_REQUIREMENTS = "True"]; then |
|
| 1269 |
+ if [ $update_requirements -eq 0 ]; then |
|
| 1270 |
+ (cd $project_dir && git reset --hard) |
|
| 1271 |
+ fi |
|
| 1263 | 1272 |
fi |
| 1264 | 1273 |
} |
| 1265 | 1274 |
|
| ... | ... |
@@ -297,6 +297,9 @@ SCREEN_NAME=${SCREEN_NAME:-stack}
|
| 297 | 297 |
# Do not install packages tagged with 'testonly' by default |
| 298 | 298 |
INSTALL_TESTONLY_PACKAGES=${INSTALL_TESTONLY_PACKAGES:-False}
|
| 299 | 299 |
|
| 300 |
+# Undo requirements changes by global requirements |
|
| 301 |
+UNDO_REQUIREMENTS=${UNDO_REQUIREMENTS:-True}
|
|
| 302 |
+ |
|
| 300 | 303 |
# Local variables: |
| 301 | 304 |
# mode: shell-script |
| 302 | 305 |
# End: |