Skip to content

Commit

Permalink
Using patch instead of reinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinius committed Nov 3, 2023
1 parent d72f61a commit afc1e2f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/partial/* /tmp/* /var/tmp/*

RUN wget https://github.com/eoxserver/eoxserver/archive/master.tar.gz && \
tar -C /opt/eoxserver/ --strip-components=1 -xvf master.tar.gz eoxserver-master/

RUN mkdir /registrar_pycsw
ADD registrar_pycsw/ \
/registrar_pycsw/registrar_pycsw
Expand All @@ -58,4 +55,7 @@ RUN cd /registrar_pycsw && \
python3 setup.py install && \
pip3 install .

ADD eoxserver.patch /opt/eoxserver/
RUN cd /opt/eoxserver && patch -p 1 < eoxserver.patch

ENV STARTUP_SCRIPTS="/registrar_pycsw/registrar_pycsw/initialize-collections.sh"
42 changes: 42 additions & 0 deletions core/eoxserver.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/eoxserver/services/mapserver/wcs/base_renderer.py b/eoxserver/services/mapserver/wcs/base_renderer.py
index a28ef027..01c9bfb7 100644
--- a/eoxserver/services/mapserver/wcs/base_renderer.py
+++ b/eoxserver/services/mapserver/wcs/base_renderer.py
@@ -171,9 +171,9 @@ class BaseRenderer(Component):

for band in bands:
ms.setMetaData(layer, {
- "band_description": band.description,
- "band_definition": band.definition,
- "band_uom": band.unit_of_measure,
+ "band_description": band.description or '',
+ "band_definition": band.definition or '',
+ "band_uom": band.unit_of_measure or '',
}, namespace=band.identifier)

if band.allowed_values:
diff --git a/eoxserver/services/ows/wcs/v20/encoders.py b/eoxserver/services/ows/wcs/v20/encoders.py
index ca8835c4..6f0f7221 100644
--- a/eoxserver/services/ows/wcs/v20/encoders.py
+++ b/eoxserver/services/ows/wcs/v20/encoders.py
@@ -418,9 +418,9 @@ class GMLCOV10Encoder(WCS20BaseXMLEncoder, GML32Encoder):
def encode_field(self, field):
return SWE("field",
SWE("Quantity",
- SWE("description", field.description),
+ SWE("description", field.description or ''),
self.encode_nil_values(field.nil_values),
- SWE("uom", code=field.unit_of_measure),
+ SWE("uom", code=field.unit_of_measure or ''),
SWE("constraint",
SWE("AllowedValues",
*[
@@ -435,7 +435,7 @@ class GMLCOV10Encoder(WCS20BaseXMLEncoder, GML32Encoder):
),
# TODO: lookup correct definition according to data type:
# http://www.opengis.net/def/dataType/OGC/0/
- definition=field.definition
+ definition=field.definition or ''
),
name=field.identifier
)

0 comments on commit afc1e2f

Please sign in to comment.