Commit: 99a2a737061c7a02c03d7dac4d464c842f0eae63
Author: Ray Molenkamp
Date:   Tue Oct 26 17:48:16 2021 -0600
Branches: master
https://developer.blender.org/rB99a2a737061c7a02c03d7dac4d464c842f0eae63

win/make.bat: Add svnfix convenience target

SVN seems to die randomly *a lot* during
large updates for some users, and I'm no
closer to finding out why that keeps happening.

"The internet" seems to imply some AV vendors
may be at fault here but nothing conclusive.

The solution however is repeatedly running
`svn cleanup`and `svn update` in the library
folder to repair the corruption and finish the
update.

This change adds a small convenience helper
to automate the repair.

This is done inside the make.bat code rather
than the shared python based update code, since
python lives in the library folder and may
or may not exist when this corruption occurs.

===================================================================

M       build_files/windows/parse_arguments.cmd
A       build_files/windows/svn_fix.cmd
M       make.bat

===================================================================

diff --git a/build_files/windows/parse_arguments.cmd 
b/build_files/windows/parse_arguments.cmd
index c63f062dfef..dcef46c2c9a 100644
--- a/build_files/windows/parse_arguments.cmd
+++ b/build_files/windows/parse_arguments.cmd
@@ -116,6 +116,9 @@ if NOT "%1" == "" (
        ) else if "%1" == "doc_py" (
                set DOC_PY=1
                goto EOF
+       ) else if "%1" == "svnfix" (
+               set SVN_FIX=1
+               goto EOF
        ) else (
                echo Command "%1" unknown, aborting!
                goto ERR
diff --git a/build_files/windows/svn_fix.cmd b/build_files/windows/svn_fix.cmd
new file mode 100644
index 00000000000..a9dcdf36847
--- /dev/null
+++ b/build_files/windows/svn_fix.cmd
@@ -0,0 +1,26 @@
+if "%BUILD_VS_YEAR%"=="2017" set BUILD_VS_LIBDIRPOST=vc15
+if "%BUILD_VS_YEAR%"=="2019" set BUILD_VS_LIBDIRPOST=vc15
+if "%BUILD_VS_YEAR%"=="2022" set BUILD_VS_LIBDIRPOST=vc15
+
+set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
+set BUILD_VS_LIBDIR="%BLENDER_DIR%..\lib\%BUILD_VS_SVNDIR%"
+
+echo Starting cleanup in %BUILD_VS_LIBDIR%.
+cd %BUILD_VS_LIBDIR%
+:RETRY
+"%SVN%" cleanup
+"%SVN%" update
+if errorlevel 1 (
+               set /p LibRetry= "Error during update, retry? y/n"
+               if /I "!LibRetry!"=="Y" (
+                       goto RETRY
+               )
+               echo.
+               echo Error: Download of external libraries failed. 
+               echo This is needed for building, please manually run 'svn 
cleanup' and 'svn update' in
+               echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make 
a successful blender build
+               echo.
+               exit /b 1
+)
+echo Cleanup complete
+
diff --git a/make.bat b/make.bat
index e94f7637512..d55b2cfd1b3 100644
--- a/make.bat
+++ b/make.bat
@@ -56,6 +56,11 @@ if "%BUILD_VS_YEAR%" == "" (
        )
 )
 
+if "%SVN_FIX%" == "1" (
+       call "%BLENDER_DIR%\build_files\windows\svn_fix.cmd"
+       goto EOF
+)
+
 if "%BUILD_UPDATE%" == "1" (
        call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
        if errorlevel 1 goto EOF

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to