Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

mapnik-osm-updater.sh looks in the wrong place on Fedora 10/x86_64 for lwpostgis.sql #1857

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments

Comments

@openstreetmap-trac
Copy link

Reporter: brwk
[Submitted to the original trac issue database at 5.23pm, Sunday, 24th May 2009]

When you install mapnik using the Fedora 10 packages for postgis, the mapnik-osm-updater.sh cannot find lwpostgis.sql because it's not looking in the correct place. The following diff adds the Fedora 10 / x86_64 location of this file to the list of those places checked. It should be mostly harmless on other platforms:

Index: mapnik-osm-updater.sh

--- mapnik-osm-updater.sh (revision 15204)
+++ mapnik-osm-updater.sh (working copy)
@@ -496,6 +496,7 @
lwpostgis="/usr/share/postgresql-8.4-postgis/lwpostgis.sql"
test -s $lwpostgis || lwpostgis="/usr/share/postgresql-8.3-postgis/lwpostgis.sql"
test -s $lwpostgis || lwpostgis="/usr/share/postgresql-8.2-postgis/lwpostgis.sql"

  • test -s $lwpostgis || lwpostgis="/usr/share/pgsql/contrib/lwpostgis-64.sql"
    test -s $lwpostgis || lwpostgis="ls /usr/share/postgresql-*-postgis/lwpostgis.sql| sort -n | head 1"
    if [ ! -s $lwpostgis ] ; then
    echo "!!!!!! ERROR: Cannot find $lwpostgis"
@openstreetmap-trac
Copy link
Author

Author: brwk
[Added to the original trac issue at 10.19am, Monday, 25th May 2009]

it has the same problem with spatial_ref_sys.sql.

Attached a proper patch that should fix both of them. Might need to check for a -32 as well as the -64 on the first one.

@openstreetmap-trac
Copy link
Author

Author: brwk
[Added to the original trac issue at 10.27am, Monday, 25th May 2009]

OK, the script is also having a problem with finding the default.style and 900913.sql files when invoked with ./mapnik-osm-updater.sh. It seems to be trying the right things but simply failing (ie dirname $0).

Not so sure about what to do about that....

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 4.06pm, Monday, 25th May 2009]

This stuff is very distribution and architecture specific so I'm sure it's reasonable for us to try and consider every possible path - maybe we should treat the script more as a template or provide some way for the user to tell it where their postgis installation scripts are?

@openstreetmap-trac
Copy link
Author

Author: Andy Allan
[Added to the original trac issue at 7.31pm, Monday, 9th December 2013]

Script is (still!) part of osm2pgsql

@openstreetmap-trac
Copy link
Author

Author: pnorman
[Added to the original trac issue at 10.18am, Tuesday, 3rd January 2017]

Fixed in osm2pgsql-dev/osm2pgsql#197

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant