From 78eeb6eccd151cdf93066123973eb1078b00f2d8 Mon Sep 17 00:00:00 2001
From: "Andrew M. 'Leny' Lindley" <andrew@andrewlindley.co.uk>
Date: Thu, 9 Apr 2015 07:15:01 +0100
Subject: [PATCH] Delete downloaded CSVs in postrm

---
 .../geoip-database-contrib_update.shim                      | 2 --
 helpers/make-geoip-database-contrib                         | 6 +++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/helpers/DATA/geoip-database-contrib/geoip-database-contrib_update.shim b/helpers/DATA/geoip-database-contrib/geoip-database-contrib_update.shim
index e9cd76ef..f50a3966 100644
--- a/helpers/DATA/geoip-database-contrib/geoip-database-contrib_update.shim
+++ b/helpers/DATA/geoip-database-contrib/geoip-database-contrib_update.shim
@@ -20,8 +20,6 @@ GEOLITE_ASNUM_IPV6_CSV_FILE="GeoIPASNum2v6.zip"
 
 GEOIP_CSV_DIR="/usr/share/doc/geoip-database-contrib/csv/"
 
-FAILED=0
-
 mkdir -p $GEOIP_CSV_DIR
 
 for url in \
diff --git a/helpers/make-geoip-database-contrib b/helpers/make-geoip-database-contrib
index 835d5c64..adb619a0 100644
--- a/helpers/make-geoip-database-contrib
+++ b/helpers/make-geoip-database-contrib
@@ -22,10 +22,14 @@ EXTERNAL='deb-src http://archive.ubuntu.com/ubuntu $UPSTREAM multiverse'
 
 . ./config
 
-sed "/exit 0/d" -i geoip-database-contrib_update
+sed "/^exit 0/d" -i geoip-database-contrib_update
 cat $DATA/geoip-database-contrib_update.shim >> geoip-database-contrib_update
 cat $DATA/copyright.shim >> debian/copyright 
 
+sed '/rm -f \/usr\/share\/GeoIP\/GeoLiteCityv6\.dat/a\
+        rm -rf /usr/share/doc/geoip-database-contrib/csv
+' -i debian/postrm
+
 changelog 'Imported into Trisquel #13927'
 
 compile
-- 
GitLab