[Libreoffice-commits] core.git: external/nss

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 19 12:54:05 UTC 2021


 external/nss/ExternalProject_nss.mk |    8 ++++++--
 external/nss/nsinstall.py           |   12 ++++++------
 2 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit 6f5186a94dcd1989cdd819e35163af0542912559
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Tue Jan 19 11:28:41 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Jan 19 13:53:17 2021 +0100

    nss: fix parallel build race in nsinstall.py
    
      File "/home/tdf/lode/jenkins/workspace/android_aarch64/external/nss/nsinstall.py", line 112, in nsinstall
        os.makedirs(args[0])
      File "/opt/rh/rh-python38/root/usr/lib64/python3.8/os.py", line 223, in makedirs
        mkdir(name, mode)
    FileExistsError: [Errno 17] File exists: '../../../../dist/public/dbm'
    ../../../coreconf/rules.mk:119: recipe for target '../../../../dist/public/dbm/d' failed
    
    Change-Id: I4273e6d3d5fa520353fff8738823ef281fe237ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109619
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index c7738ca2d759..759ef461e3f8 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -16,7 +16,9 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
 ))
 
 ifeq ($(OS),WNT)
-$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+		$(call gb_ExternalExecutable_get_dependencies,python) \
+		$(SRCDIR)/external/nss/nsinstall.py
 	$(call gb_Trace_StartRange,nss,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
 		$(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
@@ -43,7 +45,9 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
 else # OS!=WNT
 # make sure to specify NSPR_CONFIGURE_OPTS as env (before make command), so nss can append it's own defaults
 # OTOH specify e.g. CC and NSINSTALL as arguments (after make command), so they will overrule nss makefile values
-$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+		$(call gb_ExternalExecutable_get_dependencies,python) \
+		$(SRCDIR)/external/nss/nsinstall.py
 	$(call gb_Trace_StartRange,nss,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
 		$(if $(filter ANDROID FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \
diff --git a/external/nss/nsinstall.py b/external/nss/nsinstall.py
index 80e9c1679373..d90a85e6c540 100644
--- a/external/nss/nsinstall.py
+++ b/external/nss/nsinstall.py
@@ -99,17 +99,17 @@ def nsinstall(argv):
   if options.D:
     if len(args) != 1:
       return 1
-    if os.path.exists(args[0]):
+    try:
+      if options.m:
+        os.makedirs(args[0], options.m)
+      else:
+        os.makedirs(args[0])
+    except FileExistsError:
       if not os.path.isdir(args[0]):
         sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
         sys.exit(1)
       if options.m:
         os.chmod(args[0], options.m)
-      sys.exit()
-    if options.m:
-      os.makedirs(args[0], options.m)
-    else:
-      os.makedirs(args[0])
     return 0
 
   # nsinstall arg1 [...] directory


More information about the Libreoffice-commits mailing list