]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 20 Jul 2018 20:28:54 +0000 (22:28 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 20 Jul 2018 20:28:54 +0000 (22:28 +0200)
1  2 
CMakeLists.txt
utils/update.php

diff --combined CMakeLists.txt
index 3f06d842b44a67fd15130f67e906e53e27dec8ec,2096c43dc9efe189992ddf5047678c5f5a84439e..347f4d488b5a9c506985aab71a1be9feebfe02b2
@@@ -53,7 -53,7 +53,7 @@@ link_directories(${PostgreSQL_LIBRARY_D
  
  find_program(PYOSMIUM pyosmium-get-changes)
  if (NOT EXISTS "${PYOSMIUM}")
-     set(PYOSMIUM_PATH "/nonexistent")
+     set(PYOSMIUM_PATH "")
          message(WARNING "pyosmium-get-changes not found (required for updates)")
  else()
      set(PYOSMIUM_PATH "${PYOSMIUM}")
@@@ -93,14 -93,6 +93,14 @@@ set(CUSTOMFILE
      website/reverse.php
      website/search.php
      website/status.php
 +    website/403.html
 +    website/509.html
 +    website/crossdomain.xml
 +    website/favicon.ico
 +    website/last_update.php
 +    website/nominatim.xml
 +    website/robots.txt
 +    website/taginfo.json
      utils/blocks.php
      utils/country_languages.php
      utils/imports.php
diff --combined utils/update.php
index 62c07fac2a3760ee154eebba598d322531627e50,6caa7e4be95717a06c6c27d8cd7bca8021209d27..db920826bb0427cabc1e07c27a268e8d0dc859a1
@@@ -40,7 -40,6 +40,7 @@@ $aCMDOption
  getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true);
  
  if (!isset($aResult['index-instances'])) $aResult['index-instances'] = 1;
 +
  if (!isset($aResult['index-rank'])) $aResult['index-rank'] = 0;
  
  date_default_timezone_set('Etc/UTC');
@@@ -69,6 -68,22 +69,22 @@@ if ($aResult['init-updates']) 
          echo "Does the URL point to a directory containing OSM update data?\n\n";
          fail('replication URL not reachable.');
      }
+     // sanity check for pyosmium-get-changes
+     if (!CONST_Pyosmium_Binary) {
+         echo "\nCONST_Pyosmium_Binary not configured.\n";
+         echo "You need to install pyosmium and set up the path to pyosmium-get-changes\n";
+         echo "in your local settings file.\n\n";
+         fail('CONST_Pyosmium_Binary not configured');
+     }
+     $aOutput = 0;
+     $sCmd = CONST_Pyosmium_Binary.' --help';
+     exec($sCmd, $aOutput, $iRet);
+     if ($iRet != 0) {
+         echo "Cannot execute pyosmium-get-changes.\n";
+         echo "Make sure you have pyosmium installed correctly\n";
+         echo "and have set up CONST_Pyosmium_Binary to point to pyosmium-get-changes.\n";
+         fail('pyosmium-get-changes not found or not usable');
+     }
      $sSetup = CONST_InstallPath.'/utils/setup.php';
      $iRet = -1;
      passthru($sSetup.' --create-functions --enable-diff-updates', $iRet);