[SCM] Debian packaging for openturns www.openturns.org branch, debian, updated. debian/1.1_rc1-2

Denis Barbier bouzim at gmail.com
Sun Dec 9 16:13:35 UTC 2012


The following commit has been merged in the debian branch:
commit 814a71bcd11124dbd0961ea50a6e09c1e7406b81
Author: Denis Barbier <bouzim at gmail.com>
Date:   Sat Dec 8 18:58:13 2012 +0100

    Replace disable-coupling_tools.patch by fix-dtd-search-path.patch
    
    WrapperFile_generic was failing too because of LD_LIBRARY_PATH being
    wrongly set during tests.  Instead of disabling more tests, this patch
    should now fix all wrapper tests.
    OPENTURNS_HOME does no more have to be set in debian/rules.

diff --git a/debian/patches/disable-coupling_tools.patch b/debian/patches/disable-coupling_tools.patch
deleted file mode 100644
index 61461c1..0000000
--- a/debian/patches/disable-coupling_tools.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Description: Disable WrapperFile_std and coupling_tools tests.
- These tests fail when running via fakeroot:
- .
-  ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
-  ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
-  ...
- .
- The problem is that python/test/CMakeLists.txt sets LD_LIBRARY_PATH,
- whereas it should add ${LIBRARY_PATH} to an existing value to not override
- paths added by fakeroot.
-
-Author: Denis Barbier <barbier at debian.org>
-Forwarded: no
-Last-Update: 2012-12-03
-
-Index: openturns/python/test/CMakeLists.txt
-===================================================================
---- openturns.orig/python/test/CMakeLists.txt
-+++ openturns/python/test/CMakeLists.txt
-@@ -214,7 +214,7 @@ ot_pyinstallcheck_test ( HermitianMatrix
- ot_pyinstallcheck_test ( TriangularComplexMatrix_std )
- 
- # Func
--ot_pyinstallcheck_test ( WrapperFile_std )
-+#ot_pyinstallcheck_test ( WrapperFile_std )
- ot_pyinstallcheck_test ( WrapperFile_generic )
- ot_pyinstallcheck_test ( NumericalMathFunction_std )
- ot_pyinstallcheck_test ( NumericalMathFunction_grad )
-@@ -633,7 +633,7 @@ ot_pyinstallcheck_test ( QuickTest IGNOR
- 
- 
- ## Distributed python wrapper
--ot_pyinstallcheck_test ( coupling_tools )
-+#ot_pyinstallcheck_test ( coupling_tools )
- ot_pyinstallcheck_test ( wrapper_data )
- ot_pyinstallcheck_test ( distributed_python_wrapper_std PARAMS "${CMAKE_CURRENT_SOURCE_DIR}" )
- ot_pyinstallcheck_test ( distributed_python_wrapper_template PARAMS "${CMAKE_CURRENT_SOURCE_DIR}" )
diff --git a/debian/patches/fix-dtd-search-path.patch b/debian/patches/fix-dtd-search-path.patch
new file mode 100644
index 0000000..61802d9
--- /dev/null
+++ b/debian/patches/fix-dtd-search-path.patch
@@ -0,0 +1,61 @@
+Description: Search for wrapper.dtd into all wrapper directories,
+ and not only Path::GetStandardWrapperDirectory().
+ Without this patch, t_WrapperFile_std.py fails.
+Author: Denis Barbier <bouzim at gmail.com>
+Origin: Debian
+Forwarded: no
+Last-Update: 2012-12-9
+
+Index: openturns/lib/src/Base/Func/WrapperFile_version1.cxx
+===================================================================
+--- openturns.orig/lib/src/Base/Func/WrapperFile_version1.cxx
++++ openturns/lib/src/Base/Func/WrapperFile_version1.cxx
+@@ -41,7 +41,21 @@ static const FileName DTDFileName = "wra
+ /* Get wrapper DTD file path */
+ FileName GetDTDFileName_version1()
+ {
+-  const FileName DTDPath = Path::GetStandardWrapperDirectory() + Os::GetDirectorySeparator() + DTDFileName;
++  // Get the directory list...
++  std::vector<FileName> directoryList = Path::GetWrapperDirectoryList();
++
++  // ... and search it for the file
++  FileName DTDPath;
++  try
++  {
++    DTDPath = Path::FindFileByNameInDirectoryList(DTDFileName, directoryList);
++
++  }
++  catch (FileNotFoundException & ex)
++  {
++    DTDPath = DTDFileName;
++  }
++
+   return DTDPath;
+ }
+ 
+Index: openturns/lib/src/Base/Func/WrapperFile_version2.cxx
+===================================================================
+--- openturns.orig/lib/src/Base/Func/WrapperFile_version2.cxx
++++ openturns/lib/src/Base/Func/WrapperFile_version2.cxx
+@@ -41,7 +41,20 @@ static const FileName DTDFileName = "wra
+ /* Get wrapper DTD file path */
+ FileName GetDTDFileName_version2()
+ {
+-  const FileName DTDPath = Path::GetStandardWrapperDirectory() + Os::GetDirectorySeparator() + DTDFileName;
++  // Get the directory list...
++  std::vector<FileName> directoryList = Path::GetWrapperDirectoryList();
++
++  // ... and search it for the file
++  FileName DTDPath;
++  try
++  {
++    DTDPath = Path::FindFileByNameInDirectoryList(DTDFileName, directoryList);
++
++  }
++  catch (FileNotFoundException & ex)
++  {
++    DTDPath = DTDFileName;
++  }
+   return DTDPath;
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 75221cf..7069e4c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
 debian-soname.patch
 fix-bigendian.patch
-disable-coupling_tools.patch
+fix-dtd-search-path.patch
diff --git a/debian/rules b/debian/rules
index da9bb5c..acf520a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -83,8 +83,10 @@ override_dh_auto_install: debian/tmp/usr/lib/R/site-library/rot
 	-mkdir -p debian/tmp/usr/share/openturns/m4
 	cp lib/m4/*.m4 debian/tmp/usr/share/openturns/m4
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	# CTestTestfile.cmake sets LD_LIBRARY_PATH to find libraries in debian/tmp.
+	# But it overrides current value, which breaks when run by fakeroot.
+	[ -z "$$LD_LIBRARY_PATH" ] || sed -i -e "s#;LD_LIBRARY_PATH=[^;]*#&:$$LD_LIBRARY_PATH#" $(builddir)/python/test/CTestTestfile.cmake
 	CTEST_OUTPUT_ON_FAILURE=1 \
-	  OPENTURNS_HOME=$(CURDIR)/debian/tmp/usr \
 	  R_LIBS_SITE=$(CURDIR)/debian/tmp/usr/lib/R/site-library \
 	  $(MAKE) $(test_makeflags) -C $(builddir) installcheck
 endif

-- 
Debian packaging for openturns www.openturns.org



More information about the debian-science-commits mailing list