From a1bf7d721cd3508668313c1279851937d93e3791 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 4 Nov 2024 17:08:54 +0100 Subject: [PATCH 1/1] nominatim: need extra pip repo on updates --- .../nominatim/templates/default/nominatim-update.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cookbooks/nominatim/templates/default/nominatim-update.erb b/cookbooks/nominatim/templates/default/nominatim-update.erb index ed5decedf..e7f8a5f67 100644 --- a/cookbooks/nominatim/templates/default/nominatim-update.erb +++ b/cookbooks/nominatim/templates/default/nominatim-update.erb @@ -7,17 +7,19 @@ date "+%c === Starting Nominatim update cycle" starttime=`date +%s` <% if node.platform?("debian") -%> + EXTRA_PIP='--extra-index-url <%= node[:nominatim][:pip_index] %>' + # First update the importer and run the migrations. - if <%= @venvprefix %>pip list --outdated | fgrep -q nominatim-db; then - <%= @venvprefix %>pip install -U nominatim-db + if <%= @venvprefix %>pip list $EXTRA_PIP --outdated | fgrep -q nominatim-db; then + <%= @venvprefix %>pip install $EXTRA_PIP -U nominatim-db if ! /sbin/runuser -u nominatim -- <%= @bindir %>/nominatim-update-refresh-db; then date "+%c === Database refresh failed. Stopping updates." exit 1 fi fi # Then only attempt to update the frontend. - if <%= @venvprefix %>pip list --outdated | fgrep -q nominatim-api; then - <%= @venvprefix %>pip install -U nominatim-api + if <%= @venvprefix %>pip list $EXTRA_PIP --outdated | fgrep -q nominatim-api; then + <%= @venvprefix %>pip install $EXTRA_PIP -U nominatim-api systemctl reload nominatim fi <% else -%> -- 2.39.5