Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/incatools/odk/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

TEMPLATE_SUFFIX = ".jinja2"
DEFAULT_TEMPLATE_DIR = Path(__file__).parent.resolve() / "templates"
RESOURCES_DIR = Path(os.environ.get("ODK_RESOURCES_DIR", "/tools/resources"))
RESOURCES_DIR = Path(os.environ.get("ODK_RESOURCES_DIR", "/odk/resources"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. If it makes you happy, but this is pointless.



class InstallPolicy(Enum):
Expand Down
3 changes: 2 additions & 1 deletion src/incatools/odk/templates/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ BRIDGEDIR = bridges
TRANSLATIONSDIR = ../translations
{% endif -%}
PATCHESDIR = $(TMPDIR)/patches
ODK_RESOURCES_DIR ?= /tools/resources
ODK_RESOURCES_DIR ?= /odk/resources

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it makes you happy, but that doesn’t serve any purpose.

ODK-Core is deliberately disconnected from the layout of the ODK Docker images. It should always get the location of the resources from the ODK_RESOURCES_DIR variable without ever having to use the fallback value.

The variable is always set either by the Docker image (OK, until INCATools/ontology-development-kit#1391 this was not the case if you were running under root, but you should not run under root anyway – I only keep that working only for backwards compatibility, but running under root is officially a Very Bad Idea™) or by the ODK Runner if you are using a native environment. The only way for that variable to be unset (and therefore the only case you might need the fallback here) is if you somehow explicitly unset if when you start the container – and if you do that you completely deserve whatever will happen…


# Files
SRC = $(ONT)-edit.$(EDIT_FORMAT)
Expand Down Expand Up @@ -257,6 +257,7 @@ $(ROBOT_PLUGINS_DIRECTORY)/%.jar:
$(ROBOT_PLUGINS_DIRECTORY)/{{ plugin.name }}.jar:
{# -#}
{% if plugin.mirror_from -%}
@mkdir -p $(ROBOT_PLUGINS_DIRECTORY)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn’t hurt, but shouldn’t be needed either.

You say in #49 that this fails “if no bundled plugin was copied first”, but there should always be bundled plugins to be copied first, since the ODK comes with no less than 3 bundled plugins (the ODK plugin, the KGCL plugin, and the SSSOM plugin).

curl --location --output $@ {{ plugin.mirror_from -}}
{% else -%}
@echo "ERROR: No URL has been provided for this plugin; you must override"
Expand Down
Loading