Package Details: imposm 0.11.1-2

Git Clone URL: https://aur.archlinux.org/imposm.git (read-only, click to copy)
Package Base: imposm
Description: Imports OpenStreetMap data into PostGIS
Upstream URL: https://github.com/omniscale/imposm3
Licenses: Apache
Submitter: simon04
Maintainer: simon04
Last Packager: simon04
Votes: 0
Popularity: 0.000000
First Submitted: 2018-05-09 09:10
Last Updated: 2021-01-23 10:03

Latest Comments

dtbaumann commented on 2021-01-23 10:08

Thanks for the quick response. I think the problem with TestWgsToMerc/TestMercToWgs might be limited to AMD Ryzen (1st generation?) processors

--- FAIL: TestWgsToMerc (0.00s) proj_test.go:11: 0 -7.081154551613623e-10

simon04 commented on 2021-01-23 10:04

Thank you for digging into the unit tests of imposm. I've submitted https://github.com/omniscale/imposm3/pull/258 and patched the build. I could not trigger failures of TestWgsToMerc/TestMercToWgs. I've updated the PKGBUILD in 0.11.1-2

dtbaumann commented on 2021-01-23 09:22

It seems that test's fail with newer versions and processors. Here are a few patches to resolve this problem


--- PKGBUILD.orig   2021-01-23 10:18:51.262634710 +0100
+++ PKGBUILD    2021-01-23 09:44:50.864595588 +0100
@@ -7,7 +7,12 @@
 arch=('x86_64')
 url="https://github.com/omniscale/$_gitname"
 license=('Apache')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/omniscale/$_gitname/archive/v$pkgver.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/omniscale/$_gitname/archive/v$pkgver.tar.gz"
+       "$pkgname-proj-test.patch"
+       "$pkgname-state-test.patch")
+sha256sums=('14045272aa0157dc5fde1cfe885fecc2703f3bf33506603f2922cdf28310ebf0'
+            'fa1238d86c5dc35554ebbe676413135a5ccf62f8c75d9c5ecfbbeeff129110e3'
+            '90d8a707683f51047b2aa96d7a6adaa0ff51649e4e4eb03a68f448f8cfcc21e0')
 depends=('geos' 'leveldb')
 makedepends=('go')

@@ -18,6 +23,8 @@
   mkdir -p $(dirname "$GOPATH/src/$_importpath")
   ln --symbolic --force --no-target-directory "$srcdir/$_gitname-$pkgver" "$GOPATH/src/$_importpath"
   cd "$GOPATH/src/$_importpath"
+  patch -p5 -i "$srcdir/$pkgname-proj-test.patch"
+  patch -p5 -i "$srcdir/$pkgname-state-test.patch"
 }

 check() {
@@ -42,5 +49,3 @@
   install -dm755 "$pkgdir/usr/bin"
   install -m755 "$pkgname" "$pkgdir/usr/bin/imposm"
 }
-
-sha256sums=('14045272aa0157dc5fde1cfe885fecc2703f3bf33506603f2922cdf28310ebf0')

--- _go/src/github.com/omniscale/imposm3/proj/proj_test.go.old  2018-05-21 20:02:34.338707514 +0200
+++ _go/src/github.com/omniscale/imposm3/proj/proj_test.go  2018-05-21 20:03:23.384835634 +0200
@@ -7,7 +7,7 @@ import (

 func TestWgsToMerc(t *testing.T) {
    x, y := WgsToMerc(0, 0)
-   if x != 0 || y != 0 {
+   if math.Abs(x) > 1e-6 || math.Abs(y) > 1e-6 {
        t.Fatalf("%v %v", x, y)
    }

@@ -19,7 +19,7 @@ func TestWgsToMerc(t *testing.T) {

 func TestMercToWgs(t *testing.T) {
    long, lat := MercToWgs(0, 0)
-   if long != 0 || lat != 0 {
+   if math.Abs(long) > 1e-6 || math.Abs(lat) > 1e-6 {
        t.Fatalf("%v %v", long, lat)
    }
    long, lat = MercToWgs(890555.9263461898, 6982997.920389788)

--- _go/src/github.com/omniscale/imposm3/import_/state_test.go.old  2020-09-29 16:44:26.491532245 +0200
+++ _go/src/github.com/omniscale/imposm3/import_/state_test.go  2020-09-29 16:44:34.568117464 +0200
@@ -57,7 +57,7 @@
            url:         "https://unknownurl_planet.openstreetmap.org/replication/day/",
            before:      time.Hour * 24 * 3,
            interval:    time.Hour * 24,
-           errContains: "no such host",
+           errContains: "No address associated with hostname",
        },
    } {
        t.Run(tt.name, func(t *testing.T) {