Skip to content

Commit 7489af8

Browse files
committed
debian packaging: fix removed diversion (take II; followup 8b054e6; reverts 5f310a7)
1 parent 9e2890d commit 7489af8

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

debian/control.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ Recommends:
8484
qgis-provider-grass,
8585
qgis-plugin-globe
8686
Suggests: gpsbabel
87-
Replaces: qgis-plugin-grass (<< 1:2.13.0+git20160204)
88-
Conflicts: uim-qt3, qgis-plugin-grass (<< 1:2.13.0+git20160204)
87+
Conflicts: uim-qt3
8988
Description: Geographic Information System (GIS)
9089
A Geographic Information System (GIS) manages, analyzes, and displays
9190
databases of geographic information. QGIS supports shape file viewing and

debian/qgis.preinst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
if [ "$1" = "install" -o "$1" = "upgrade" ]; then
6+
# Fix bad diversions
7+
div=$(dpkg-divert --listpackage /usr/bin/qgis)
8+
if [ -n "$div" -a "$div" = qgis-plugin-grass ]; then
9+
for i in /usr/bin/qgis /usr/bin/qbrowser; do
10+
if [ -e $i ] && ! [ -e $i.undiverted ]; then
11+
mv $i $i.undiverted
12+
fi
13+
dpkg-divert --package qgis-plugin-grass --remove --rename --divert $i.bin $i
14+
if [ -e $i.undiverted ]; then
15+
mv $i.undiverted $i
16+
fi
17+
done
18+
fi
19+
fi
20+
21+
#DEBHELPER#
22+
23+
exit 0

debian/qgis.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/sh
22

3-
if dpkg -s qgis-plugin-grass >/dev/null; then
3+
if dpkg -s qgis-plugin-grass >/dev/null 2>&1; then
44
if [ "$LD_LIBRARY_PATH" = "" ]; then
55
LD_LIBRARY_PATH=/usr/lib/{GRASS}/lib
66
else
77
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/{GRASS}/lib
88
fi
99
fi
1010

11-
if dpkg -s qgis-oracle-provider >/dev/null; then
11+
if dpkg -s qgis-oracle-provider >/dev/null 2>&1; then
1212
if [ "$LD_LIBRARY_PATH" = "" ]; then
1313
LD_LIBRARY_PATH={ORACLE_LIBDIR}
1414
else

0 commit comments

Comments
 (0)