Added update-alternative handling for /usr/bin/senlin

This commit is contained in:
Thomas Goirand
2015-12-09 08:45:53 +00:00
parent e475a4a2f4
commit 75d07d5700
7 changed files with 69 additions and 1 deletions

11
debian/python-senlinclient.postinst vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "configure" ] ; then
update-alternatives --install /usr/bin/senlin senlin /usr/bin/python2-senlin 300
fi
#DEBHELPER#
exit 0

11
debian/python-senlinclient.postrm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
update-alternatives --remove senlin /usr/bin/python2-senlin
fi
#DEBHELPER#
exit 0

11
debian/python-senlinclient.prerm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] ; then
update-alternatives --remove senlin /usr/bin/python2-senlin
fi
#DEBHELPER#
exit 0

11
debian/python3-senlinclient.postinst vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "configure" ] ; then
update-alternatives --install /usr/bin/senlin senlin /usr/bin/python3-senlin 200
fi
#DEBHELPER#
exit 0

11
debian/python3-senlinclient.postrm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] ; then
update-alternatives --remove senlin /usr/bin/python3-senlin
fi
#DEBHELPER#
exit 0

11
debian/python3-senlinclient.prerm vendored Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "remove" ] ; then
update-alternatives --remove senlin /usr/bin/python3-senlin
fi
#DEBHELPER#
exit 0

4
debian/rules vendored
View File

@@ -19,7 +19,9 @@ override_dh_auto_install:
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python3-senlinclient; \
done
rm -rf $(CURDIR)/debian/python*-python-senlinclient/usr/lib/python*/dist-packages/*.pth
rm -rf $(CURDIR)/debian/python*-senlinclient/usr/lib/python*/dist-packages/*.pth
mv $(CURDIR)/debian/python-senlinclient/usr/bin/senlin $(CURDIR)/debian/python-senlinclient/usr/bin/python2-senlin
mv $(CURDIR)/debian/python3-senlinclient/usr/bin/senlin $(CURDIR)/debian/python3-senlinclient/usr/bin/python3-senlin
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3