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

Index: harp-1.4/python/_harppy.py
===================================================================
--- harp-1.4.orig/python/_harppy.py
+++ harp-1.4/python/_harppy.py
@@ -387,8 +387,8 @@ def _init():
                                                        _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"
         _lib.harp_set_udunits2_xml_path_conditional(_encode_path(os.path.basename(clib)),
                                                     _encode_path(os.path.dirname(clib)),
                                                     _encode_path(relpath))
Index: harp-1.4/tools/harpcheck/harpcheck.c
===================================================================
--- harp-1.4.orig/tools/harpcheck/harpcheck.c
+++ harp-1.4/tools/harpcheck/harpcheck.c
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
         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);
Index: harp-1.4/tools/harpcollocate/harpcollocate.c
===================================================================
--- harp-1.4.orig/tools/harpcollocate/harpcollocate.c
+++ harp-1.4/tools/harpcollocate/harpcollocate.c
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
         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);
Index: harp-1.4/tools/harpconvert/harpconvert.c
===================================================================
--- harp-1.4.orig/tools/harpconvert/harpconvert.c
+++ harp-1.4/tools/harpconvert/harpconvert.c
@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
         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);
Index: harp-1.4/tools/harpdump/harpdump.c
===================================================================
--- harp-1.4.orig/tools/harpdump/harpdump.c
+++ harp-1.4/tools/harpdump/harpdump.c
@@ -341,7 +341,7 @@ int main(int argc, char *argv[])
         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);
Index: harp-1.4/tools/harpmerge/harpmerge.c
===================================================================
--- harp-1.4.orig/tools/harpmerge/harpmerge.c
+++ harp-1.4/tools/harpmerge/harpmerge.c
@@ -320,7 +320,7 @@ int main(int argc, char *argv[])
         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);
