diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-12 13:16:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-12 16:01:06 +0300 |
commit | 8e9e58895b32afc38f856053335c9b27324c6f9e (patch) | |
tree | 0e429411b6bdc7ff6f4e331c67c610277bd98fe7 /build_files | |
parent | 65bc5041c35a086ce54827ad9c9f5caa028693e1 (diff) |
Fix issues with make_update.py when run from release branch
The issue was rooting to the fact that the script was iterating into
every directory inside of blender.git/../lib/ and attempted to switch
them to the desired path. This doesn't work in an environment where
both master and release branch are built (or any environment where
non-needed SVN directories are not automatically removed).
This change makes it so script explicitly generates a list of
directories which are required for the build. For example, the script
now stores an exact folder with ABI such as win64_vc14.
Only those explicitly listed directories will be updated.
This allows to:
- Solve compilation failure of 2.81 branch after checkout for
win64_vc15 libraries has been created.
- Fail compilation if actually expected tag is missing (for example,
when trying to build release branch prior to libraries tag).
Now, there was a confusing logic about possible .svn folder in
lib_dirpath (effectively, blender.git/../lib/.svn) which is not
something what is supposed to happen with the setup of buildbot we are
using for quite some time now. This logic has been removed now.
This change includes old-style string format(), mainly because it is
not know that the buidlbot scripts are run using python3 on CentOS
builder.
Differential Revision: https://developer.blender.org/D6230
Diffstat (limited to 'build_files')
-rwxr-xr-x | build_files/utils/make_update.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index ec72514fdfc..82a95d8ae5b 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -41,6 +41,11 @@ def svn_update(args, release_version): lib_dirpath = os.path.join(get_blender_git_root(), '..', 'lib') svn_url = make_utils.svn_libraries_base_url(release_version) + # List of directory names which corresponds to used SVN checkouts. + # Is used to ensure the checkout points to a valid branch/tag. + # Should consists only of directory name, such as "win64_vc14", for example. + used_lib_dir_names = [] + # Checkout precompiled libraries if sys.platform == 'darwin': lib_platform = "darwin" @@ -58,6 +63,8 @@ def svn_update(args, release_version): if lib_platform: lib_platform_dirpath = os.path.join(lib_dirpath, lib_platform) + used_lib_dir_names.append(lib_platform) + if not os.path.exists(lib_platform_dirpath): print_stage("Checking out Precompiled Libraries") @@ -72,6 +79,8 @@ def svn_update(args, release_version): lib_tests = "tests" lib_tests_dirpath = os.path.join(lib_dirpath, lib_tests) + used_lib_dir_names.append(lib_tests) + if not os.path.exists(lib_tests_dirpath): print_stage("Checking out Tests") @@ -86,20 +95,13 @@ def svn_update(args, release_version): print_stage("Updating Precompiled Libraries and Tests") if os.path.isdir(lib_dirpath): - for dirname in os.listdir(lib_dirpath): + for dirname in used_lib_dir_names: + print_stage("Updating {}" . format(dirname)) dirpath = os.path.join(lib_dirpath, dirname) - if dirname == ".svn": - # Cleanup must be run from svn root directory if it exists. - if not make_utils.command_missing(args.svn_command): - call(svn_non_interactive + ["cleanup", lib_dirpath]) - continue - svn_dirpath = os.path.join(dirpath, ".svn") - svn_root_dirpath = os.path.join(lib_dirpath, ".svn") - if os.path.isdir(dirpath) and \ - (os.path.exists(svn_dirpath) or os.path.exists(svn_root_dirpath)): + if os.path.isdir(dirpath) and os.path.exists(svn_dirpath): if make_utils.command_missing(args.svn_command): sys.stderr.write("svn not found, can't update libraries\n") sys.exit(1) |