diff --git a/debian/changelog b/debian/changelog index 8fef28c..1d6847b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +oslo-config (1:1.4.0.0~a3-2) unstable; urgency=medium + + * Added update-alternative for the oslo-config-generator binary. + + -- Thomas Goirand Sat, 09 Aug 2014 00:51:02 +0800 + oslo-config (1:1.4.0.0~a3-1) unstable; urgency=medium * New upstream release. diff --git a/debian/python-oslo.config.postinst b/debian/python-oslo.config.postinst new file mode 100644 index 0000000..95e053b --- /dev/null +++ b/debian/python-oslo.config.postinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + update-alternatives --install /usr/bin/oslo-config-generator oslo-config-generator /usr/bin/python2-oslo-config-generator 300 +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/python-oslo.config.postrm b/debian/python-oslo.config.postrm new file mode 100644 index 0000000..a150e23 --- /dev/null +++ b/debian/python-oslo.config.postrm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then + update-alternatives --remove oslo-config-generator /usr/bin/python2-oslo-config-generator +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/python-oslo.config.prerm b/debian/python-oslo.config.prerm new file mode 100644 index 0000000..2f12c02 --- /dev/null +++ b/debian/python-oslo.config.prerm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] ; then + update-alternatives --remove oslo-config-generator /usr/bin/python2-oslo-config-generator +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/python3-oslo.config.postinst b/debian/python3-oslo.config.postinst new file mode 100644 index 0000000..5c28fbb --- /dev/null +++ b/debian/python3-oslo.config.postinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + update-alternatives --install /usr/bin/oslo-config-generator oslo-config-generator /usr/bin/python3-oslo-config-generator 200 +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/python3-oslo.config.postrm b/debian/python3-oslo.config.postrm new file mode 100644 index 0000000..aaba94a --- /dev/null +++ b/debian/python3-oslo.config.postrm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then + update-alternatives --remove oslo-config-generator /usr/bin/python3-oslo-config-generator +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/python3-oslo.config.prerm b/debian/python3-oslo.config.prerm new file mode 100644 index 0000000..1e2fec9 --- /dev/null +++ b/debian/python3-oslo.config.prerm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] ; then + update-alternatives --remove oslo-config-generator /usr/bin/python3-oslo-config-generator +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 3cc9cc2..7139e6c 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,8 @@ override_dh_auto_install: python$$pyvers setup.py install --install-layout=deb \ --root $(CURDIR)/debian/python3-oslo.config; \ done + mv $(CURDIR)/debian/python-oslo.config/usr/bin/oslo-config-generator $(CURDIR)/debian/python-oslo.config/usr/bin/python2-oslo-config-generator + mv $(CURDIR)/debian/python3-oslo.config/usr/bin/oslo-config-generator $(CURDIR)/debian/python3-oslo.config/usr/bin/python3-oslo-config-generator override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))