debian packaging: fix removed diversion (take II; followup 8b054e6; reverts 5f310a7)

This commit is contained in:
Juergen E. Fischer 2016-02-12 21:18:25 +01:00
parent 9e2890dad4
commit 7489af8695
3 changed files with 26 additions and 4 deletions

3
debian/control.in vendored
View File

@ -84,8 +84,7 @@ Recommends:
qgis-provider-grass,
qgis-plugin-globe
Suggests: gpsbabel
Replaces: qgis-plugin-grass (<< 1:2.13.0+git20160204)
Conflicts: uim-qt3, qgis-plugin-grass (<< 1:2.13.0+git20160204)
Conflicts: uim-qt3
Description: Geographic Information System (GIS)
A Geographic Information System (GIS) manages, analyzes, and displays
databases of geographic information. QGIS supports shape file viewing and

23
debian/qgis.preinst vendored Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
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
fi
#DEBHELPER#
exit 0

4
debian/qgis.sh.in vendored
View File

@ -1,6 +1,6 @@
#!/bin/sh
if dpkg -s qgis-plugin-grass >/dev/null; then
if dpkg -s qgis-plugin-grass >/dev/null 2>&1; then
if [ "$LD_LIBRARY_PATH" = "" ]; then
LD_LIBRARY_PATH=/usr/lib/{GRASS}/lib
else
@ -8,7 +8,7 @@ if dpkg -s qgis-plugin-grass >/dev/null; then
fi
fi
if dpkg -s qgis-oracle-provider >/dev/null; then
if dpkg -s qgis-oracle-provider >/dev/null 2>&1; then
if [ "$LD_LIBRARY_PATH" = "" ]; then
LD_LIBRARY_PATH={ORACLE_LIBDIR}
else