Description: Use the udunits files shipped in /usr/share/xml, not ones shipped with harp
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2018-06-16
Forwarded: no

--- a/python/_harppy.py
+++ b/python/_harppy.py
@@ -523,8 +523,9 @@
                                                            _encode_path(relpath))
 
     if os.getenv('UDUNITS2_XML_PATH') is None:
-        # Set udunits2 xml path relative to C library
-        relpath = "../share/harp/udunits2.xml"
+        # Set udunits2 xml path 
+        relpath = "../share/xml/udunits/udunits2.xml"
+
         if _system() == "Windows":
             _lib.harp_set_udunits2_xml_path_conditional(_encode_path(os.path.basename(clib)), _ffi.NULL,
                                                         _encode_path(relpath))
--- a/tools/harpcheck/harpcheck.c
+++ b/tools/harpcheck/harpcheck.c
@@ -105,7 +105,7 @@
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
     }
-    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/harp/udunits2.xml") != 0)
+    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/xml/udunits/udunits2.xml") != 0)
     {
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
--- a/tools/harpcollocate/harpcollocate.c
+++ b/tools/harpcollocate/harpcollocate.c
@@ -176,7 +176,7 @@
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
     }
-    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/harp/udunits2.xml") != 0)
+    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/xml/udunits/udunits2.xml") != 0)
     {
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
--- a/tools/harpconvert/harpconvert.c
+++ b/tools/harpconvert/harpconvert.c
@@ -264,7 +264,7 @@
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
     }
-    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/harp/udunits2.xml") != 0)
+    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/xml/udunits/udunits2.xml") != 0)
     {
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
--- a/tools/harpdump/harpdump.c
+++ b/tools/harpdump/harpdump.c
@@ -360,7 +360,7 @@
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
     }
-    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/harp/udunits2.xml") != 0)
+    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/xml/udunits/udunits2.xml") != 0)
     {
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
--- a/tools/harpmerge/harpmerge.c
+++ b/tools/harpmerge/harpmerge.c
@@ -365,7 +365,7 @@
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
     }
-    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/harp/udunits2.xml") != 0)
+    if (harp_set_udunits2_xml_path_conditional(argv[0], NULL, "../share/xml/udunits/udunits2.xml") != 0)
     {
         fprintf(stderr, "ERROR: %s\n", harp_errno_to_string(harp_errno));
         exit(1);
