Package: osmqpgsql tags 532145 patch tags 532145 upstream thanks Hello,
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" -- Regards, EddyP ============================================= "Imagination is more important than knowledge" A.Einstein
#! /bin/sh /usr/share/dpatch/dpatch-run ## 20_dont-force-passwords.dpatch by Eddy PetriÈor <eddy.petri...@gmail.com> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: New patch generated from osm2pgsql 0.52.20080408-3 diff.gz @DPATCH@ --- osm2pgsql-0.52.20080408.orig/osm2pgsql.c +++ osm2pgsql-0.52.20080408/osm2pgsql.c @@ -478,7 +478,7 @@ exit(EXIT_FAILURE); } - if (username || pass_prompt) + if (pass_prompt) password = simple_prompt("Password:", 100, 0); conninfo = build_conninfo(db, username, password, host, port);
signature.asc
Description: OpenPGP digital signature