]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/exec_utils.py
Merge pull request #2892 from lonvia/optional-forward-dependecies
[nominatim.git] / nominatim / tools / exec_utils.py
index 675e070b3f30d00d8d9149c88454d2e61795279c..ed3bb53b3d8187cccae788942974dbd597f874a8 100644 (file)
@@ -117,7 +117,6 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None:
     env = get_pg_env(options['dsn'])
     cmd = [str(options['osm2pgsql']),
            '--hstore', '--latlon', '--slim',
-           '--with-forward-dependencies', 'false',
            '--log-progress', 'true',
            '--number-processes', str(options['threads']),
            '--cache', str(options['osm2pgsql_cache']),
@@ -131,14 +130,14 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None:
     else:
         cmd.extend(('--output', 'gazetteer'))
 
-    if options['append']:
-        cmd.append('--append')
-    else:
-        cmd.append('--create')
+    cmd.append('--append' if options['append'] else '--create')
 
     if options['flatnode_file']:
         cmd.extend(('--flat-nodes', options['flatnode_file']))
 
+    if not options.get('forward_dependencies', False):
+        cmd.extend(('--with-forward-dependencies', 'false'))
+
     for key, param in (('slim_data', '--tablespace-slim-data'),
                        ('slim_index', '--tablespace-slim-index'),
                        ('main_data', '--tablespace-main-data'),