[qgis] 03/04: Fix removal of obsolete diversions for bother the grass plugin & provider.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Wed Mar 9 19:43:59 UTC 2016


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

sebastic pushed a commit to branch master
in repository qgis.

commit ad14fbee7d9eaec51cad1a654dac969b6c2c63d4
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Mar 9 07:21:05 2016 +0100

    Fix removal of obsolete diversions for bother the grass plugin & provider.
---
 debian/changelog    |  2 ++
 debian/qgis.preinst | 20 +++++++-------------
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 26f4c2a..fba2175 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ qgis (2.14.0+dfsg0-2) UNRELEASED; urgency=medium
 
   * Restore use of pkgkde_symbolshelper by dh.
   * Add patch for osgEarth 2.7 support, re-enable globe plugin.
+  * Fix removal of obsolete diversions for bother the grass plugin & provider.
+    (closes: #817176)
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 08 Mar 2016 22:04:34 +0100
 
diff --git a/debian/qgis.preinst b/debian/qgis.preinst
index 392b962..5ce085f 100644
--- a/debian/qgis.preinst
+++ b/debian/qgis.preinst
@@ -3,19 +3,13 @@
 set -e
 
 if [ "$1" = "install" -o "$1" = "upgrade" ]; then
-	# Fix bad diversions
-        div=$(dpkg-divert --listpackage /usr/bin/qgis)
-        if [ -n "$div" -a "$div" = qgis-plugin-grass ]; then
-               for i in /usr/bin/qgis /usr/bin/qbrowser; do
-                       if [ -e $i ] && ! [ -e $i.undiverted ]; then
-                               mv $i $i.undiverted
-                       fi
-                       dpkg-divert --package qgis-plugin-grass --remove --rename --divert $i.bin $i
-                       if [ -e $i.undiverted ]; then
-                               mv $i.undiverted $i
-                       fi
-               done
-       fi
+        # Remove obsolete diversions
+        for i in /usr/bin/qgis /usr/bin/qbrowser; do
+                pkg=$(dpkg-divert --listpackage $i)
+                if [ -n "$pkg" -a "$pkg" = qgis-plugin-grass -o "$pkg" = qgis-provider-grass ]; then
+                        dpkg-divert --package $pkg --rename --remove $i
+                fi
+        done
 fi
 
 #DEBHELPER#

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



More information about the Pkg-grass-devel mailing list