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

Please unblock package osm2pgsql

It fixes two important issues reported to me by one of the developers
one was also reported in #860273.

unblock osm2pgsql/0.92.0+ds-2

Kind Regards,

Bas
diff -Nru osm2pgsql-0.92.0+ds/debian/changelog 
osm2pgsql-0.92.0+ds/debian/changelog
--- osm2pgsql-0.92.0+ds/debian/changelog        2016-12-16 11:34:24.000000000 
+0100
+++ osm2pgsql-0.92.0+ds/debian/changelog        2017-04-13 23:00:11.000000000 
+0200
@@ -1,3 +1,18 @@
+osm2pgsql (0.92.0+ds-2) unstable; urgency=medium
+
+  * Add upstream patches from 0.92.x branch to fix two important issues:
+    - Ignore relations with more than 32k members.
+      There is a hard restriction in the pgsql middle tables, where
+      relation members are indexed using a smallint. To remain
+      consistent, drop all relations which exceed this size.
+      https://github.com/openstreetmap/osm2pgsql/issues/713
+    - Use the same logic for queuing pending ways with multi and pgsql.
+      Fixes ways disappearing from the output table.
+      https://github.com/openstreetmap/osm2pgsql/issues/735
+    (closes: #860273)
+
+ -- Bas Couwenberg <sebas...@debian.org>  Thu, 13 Apr 2017 23:00:11 +0200
+
 osm2pgsql (0.92.0+ds-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru 
osm2pgsql-0.92.0+ds/debian/patches/0001-ignore-relations-with-more-than-32k-members.patch
 
osm2pgsql-0.92.0+ds/debian/patches/0001-ignore-relations-with-more-than-32k-members.patch
--- 
osm2pgsql-0.92.0+ds/debian/patches/0001-ignore-relations-with-more-than-32k-members.patch
   1970-01-01 01:00:00.000000000 +0100
+++ 
osm2pgsql-0.92.0+ds/debian/patches/0001-ignore-relations-with-more-than-32k-members.patch
   2017-04-13 22:55:58.000000000 +0200
@@ -0,0 +1,20 @@
+Description: ignore relations with more than 32k members
+ There is a hard restriction in the pgsql middle tables, where
+ relation members are indexed using a smallint. To remain
+ consistent, drop all relations which exceed this size.
+Author: Sarah Hoffmann <lon...@denofr.de>
+Origin: 
https://github.com/openstreetmap/osm2pgsql/commit/ec9c84edbcbd0dafab6d6c30290083e75c023890
+Bug: https://github.com/openstreetmap/osm2pgsql/issues/713
+
+--- a/parse-osmium.cpp
++++ b/parse-osmium.cpp
+@@ -176,6 +176,9 @@ void parse_osmium_t::relation(osmium::Re
+     if (rel.deleted()) {
+         m_data->relation_delete(rel.id());
+     } else {
++        if (rel.members().size() > 32767) {
++            return;
++        }
+         convert_tags(rel);
+         convert_members(rel.members());
+         if (m_append) {
diff -Nru 
osm2pgsql-0.92.0+ds/debian/patches/0001-Use-the-same-logic-for-queuing-pending-ways-with-mul.patch
 
osm2pgsql-0.92.0+ds/debian/patches/0001-Use-the-same-logic-for-queuing-pending-ways-with-mul.patch
--- 
osm2pgsql-0.92.0+ds/debian/patches/0001-Use-the-same-logic-for-queuing-pending-ways-with-mul.patch
  1970-01-01 01:00:00.000000000 +0100
+++ 
osm2pgsql-0.92.0+ds/debian/patches/0001-Use-the-same-logic-for-queuing-pending-ways-with-mul.patch
  2017-04-13 23:00:11.000000000 +0200
@@ -0,0 +1,27 @@
+Description: Use the same logic for queuing pending ways with multi and pgsql
+ Fixes ways disappearing from the output table.
+Author: Paul Norman <penor...@mac.com>
+Origin: 
https://github.com/openstreetmap/osm2pgsql/commit/8ffe16e67da43fd531a5e73b10d31465324f4a91
+Bug: https://github.com/openstreetmap/osm2pgsql/issues/735
+Bug-Debian: https://bugs.debian.org/860273
+
+--- a/output-multi.cpp
++++ b/output-multi.cpp
+@@ -92,7 +92,7 @@ void output_multi_t::enqueue_ways(pendin
+     }
+ 
+     //make sure to get this one as well and move to the next
+-    if(popped == id) {
++    if (popped > id) {
+         if (!ways_done_tracker->is_marked(popped) && 
id_tracker::is_valid(popped)) {
+             job_queue.push(pending_job_t(popped, output_id));
+             added++;
+@@ -143,7 +143,7 @@ void output_multi_t::enqueue_relations(p
+     }
+ 
+     //make sure to get this one as well and move to the next
+-    if(popped == id) {
++    if (popped > id) {
+         if(id_tracker::is_valid(popped)) {
+             job_queue.push(pending_job_t(popped, output_id));
+             added++;
diff -Nru osm2pgsql-0.92.0+ds/debian/patches/series 
osm2pgsql-0.92.0+ds/debian/patches/series
--- osm2pgsql-0.92.0+ds/debian/patches/series   1970-01-01 01:00:00.000000000 
+0100
+++ osm2pgsql-0.92.0+ds/debian/patches/series   2017-04-13 22:55:55.000000000 
+0200
@@ -0,0 +1,2 @@
+0001-ignore-relations-with-more-than-32k-members.patch
+0001-Use-the-same-logic-for-queuing-pending-ways-with-mul.patch

Reply via email to