[libmateweather] 01/01: debian/patches: Add 0000_libmateweather-add-some-missing-zones.patch.

Vangelis Mouhtsis gnugr-guest at moszumanska.debian.org
Fri Dec 9 15:53:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

gnugr-guest pushed a commit to branch debian/jessie/updates
in repository libmateweather.

commit 9e32c9da88bb26193a95c1189e1bf9b9f05ca223
Author: Vangelis Mouhtsis <vangelis at gnugr.org>
Date:   Thu Dec 8 16:36:47 2016 +0200

    debian/patches: Add 0000_libmateweather-add-some-missing-zones.patch.
---
 ...000_libmateweather-add-some-missing-zones.patch | 53 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 54 insertions(+)

diff --git a/debian/patches/0000_libmateweather-add-some-missing-zones.patch b/debian/patches/0000_libmateweather-add-some-missing-zones.patch
new file mode 100644
index 0000000..43d6107
--- /dev/null
+++ b/debian/patches/0000_libmateweather-add-some-missing-zones.patch
@@ -0,0 +1,53 @@
+diff --git a/libmateweather/weather-iwin.c b/libmateweather/weather-iwin.c
+index e098354..e4bc387 100644
+--- a/libmateweather/weather-iwin.c
++++ b/libmateweather/weather-iwin.c
+@@ -462,7 +462,7 @@ iwin_start_open (WeatherInfo *info)
+     zone = g_ascii_strdown (loc->zone, -1);
+     state = g_strndup (zone, 2);
+ 
+-    url = g_strdup_printf ("http://weather.noaa.gov/pub/data/forecasts/zone/%s/%s.txt", state, zone);
++    url = g_strdup_printf ("http://tgftp.nws.noaa.gov/data/forecasts/zone/%s/%s.txt", state, zone);
+ 
+     g_free (zone);
+     g_free (state);
+diff --git a/libmateweather/weather-metar.c b/libmateweather/weather-metar.c
+index da71db5..5bcabc3 100644
+--- a/libmateweather/weather-metar.c
++++ b/libmateweather/weather-metar.c
+@@ -510,7 +510,7 @@ metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)
+ 
+     loc = info->location;
+ 
+-    searchkey = g_strdup_printf ("\n%s", loc->code);
++    searchkey = g_strdup_printf ("<raw_text>%s", loc->code);
+     p = strstr (msg->response_body->data, searchkey);
+     g_free (searchkey);
+     if (p) {
+@@ -522,8 +522,8 @@ metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)
+ 	    metar = g_strdup (p);
+ 	success = metar_parse (metar, info);
+ 	g_free (metar);
+-    } else if (!strstr (msg->response_body->data, "National Weather Service")) {
+-	/* The response doesn't even seem to have come from NWS...
++    } else if (!strstr (msg->response_body->data, "aviationweather.gov")) {
++	/* The response doesn't even seem to have come from NOAA...
+ 	 * most likely it is a wifi hotspot login page. Call that a
+ 	 * network error.
+ 	 */
+@@ -550,8 +550,14 @@ metar_start_open (WeatherInfo *info)
+     }
+ 
+     msg = soup_form_request_new (
+-	"GET", "http://weather.noaa.gov/mgetmetar.php",
+-	"cccc", loc->code,
++	"GET", "https://www.aviationweather.gov/adds/dataserver_current/httpparam",
++	"dataSource", "metars",
++	"requestType", "retrieve",
++	"format", "xml",
++	"hoursBeforeNow", "3",
++	"mostRecent", "true",
++	"fields", "raw_text",
++	"stationString", loc->code,
+ 	NULL);
+     soup_session_queue_message (info->session, msg, metar_finish, info);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9c88ea2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0000_libmateweather-add-some-missing-zones.patch
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/libmateweather.git



More information about the pkg-mate-commits mailing list