Package: osmqpgsql
tags 532145 patch
tags 532145 upstream


I just looked into the code and it seems that whenever the user
parameter was given, the password prompt appeared, evn if not necessary.

Since -W forces the password prompt, I decoupled this behaviour from the
presence of the user name, allowing this way automated imports and
passwords prompts, if necessary (by providing the -W parameter).

(D)Patch is attached, I tested it on my password-less config on a lenny
machine (made a local backport) and it works properly. If used without a
password when is actually needed this message appears, (which, imo,
could be improved to add a hint, if -W wasn't present - "maybe a
password is required?"), so I'd say the fix makes sense and doesn't
break anything that worked before:

0 e...@heidi ~/usr/src/osm/planet/git-planet-rom $ osm2pgsql -d gis -m
-U osm planet-rom.osm
osm2pgsql SVN version 0.52-20090607 $Rev: 7141 $

Connection to database failed: FATAL:  Ident authentication failed for
user "osm"

"Imagination is more important than knowledge" A.Einstein
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_dont-force-passwords.dpatch by Eddy Petrișor <>
## All lines beginning with `## DP:' are a description of the patch.
## DP: New patch generated from osm2pgsql 0.52.20080408-3 diff.gz


--- osm2pgsql-0.52.20080408.orig/osm2pgsql.c
+++ osm2pgsql-0.52.20080408/osm2pgsql.c
@@ -478,7 +478,7 @@
-    if (username || pass_prompt)
+    if (pass_prompt)
         password = simple_prompt("Password:", 100, 0);
     conninfo = build_conninfo(db, username, password, host, port);

Attachment: signature.asc
Description: OpenPGP digital signature

Pkg-grass-devel mailing list

Reply via email to