[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#622973: pu: package josm/0.0.svn3376-1+squeeze1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu

Dear Release Team,
I'm writing to you to ask for a possible p-u upload for JOSM.

OpenStreetMap is pursuing a process to change the license of its data.
Tomorrow it will enter Phase III, i.e. a contributor has to explicitely accept
or decline the new license [0], otherwise he'll get a 403 error [1].

The suggested fix [2] was to improve the error message, including the response
body. Upstream did this [3], and released a new snapshot (4021, currently in
sid).

I'm attaching the backported patch.

Thanks,
David

[0]: http://lists.openstreetmap.org/pipermail/talk/2011-April/057649.html
[1]: http://lists.openstreetmap.org/pipermail/josm-dev/2011-April/005504.html
[2]: http://lists.openstreetmap.org/pipermail/josm-dev/2011-April/005508.html
[3]:
https://josm.openstreetmap.de/changeset?reponame=josm&new=4020%40%2F&old=4019%40%2F

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
From: David Paleino <dapal@debian.org>
Subject: backport fixed failed authorisation dialog from 4021
Origin: vendor
Forwarded: not-needed

---
 src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java |    3 +-
 src/org/openstreetmap/josm/tools/ExceptionUtil.java     |   24 ++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

--- josm.orig/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
+++ josm/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
@@ -271,9 +271,10 @@ public class ExceptionDialogUtil {
      * @param e the exception
      */
     public static void explainAuthorizationFailed(OsmApiException e) {
+        // Fixme: add special handling that calls ExceptionUtil.explainFailedOAuthAuthorisation(e)
         HelpAwareOptionPane.showOptionDialog(
                 Main.parent,
-                ExceptionUtil.explainFailedOAuthAuthorisation(e),
+                ExceptionUtil.explainFailedAuthorisation(e),
                 tr("Authorisation Failed"),
                 JOptionPane.ERROR_MESSAGE,
                 ht("/ErrorMessages#AuthenticationFailed")
--- josm.orig/src/org/openstreetmap/josm/tools/ExceptionUtil.java
+++ josm/src/org/openstreetmap/josm/tools/ExceptionUtil.java
@@ -128,6 +128,30 @@ public class ExceptionUtil {
         );
     }
 
+   public static String explainFailedAuthorisation(OsmApiException e) {
+        e.printStackTrace();
+        String header = e.getErrorHeader();
+        String body = e.getErrorBody();
+        String msg = null;
+        if (header != null) {
+            if (body != null && !header.equals(body)) {
+                msg = header + " (" + body + ")";
+            } else {
+                msg = header;
+            }
+        } else {
+            msg = body;
+        }
+
+        return tr("<html>"
+                + "Authorisation at the OSM server failed.<br>"
+                + "The server reported the following error:<br>"
+                + "''{0}''"
+                + "</html>",
+                msg
+        );
+    }
+
     public static String explainFailedOAuthAuthorisation(OsmApiException e) {
         e.printStackTrace();
         return tr("<html>"

Attachment: signature.asc
Description: PGP signature


Reply to: