Added update-alternative for the oslo-config-generator binary.

This commit is contained in:
Thomas Goirand
2014-08-09 00:51:28 +08:00
parent 855bdd2bca
commit 78fedd1a9d
8 changed files with 74 additions and 0 deletions

6
debian/changelog vendored
View File

@@ -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 <zigo@debian.org> Sat, 09 Aug 2014 00:51:02 +0800
oslo-config (1:1.4.0.0~a3-1) unstable; urgency=medium
* New upstream release.

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

@@ -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

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

@@ -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

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

@@ -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

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

@@ -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

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

@@ -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

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

@@ -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

2
debian/rules vendored
View File

@@ -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)))