[Python-modules-commits] r22245 - in packages/pytest/trunk/debian (14 files)
laarmen-guest at users.alioth.debian.org
laarmen-guest at users.alioth.debian.org
Fri Jun 22 12:06:58 UTC 2012
Date: Friday, June 22, 2012 @ 12:06:53
Author: laarmen-guest
Revision: 22245
Install /u/b/py.test in d/rules, simplify the maintainer scripts and s/postrm/prerm/
Added:
packages/pytest/trunk/debian/python-pytest.prerm
packages/pytest/trunk/debian/python3-pytest.prerm
Modified:
packages/pytest/trunk/debian/changelog
packages/pytest/trunk/debian/python-pytest.postinst
packages/pytest/trunk/debian/python-pytest.rtinstall
packages/pytest/trunk/debian/python-pytest.rtremove
packages/pytest/trunk/debian/python3-pytest.postinst
packages/pytest/trunk/debian/python3-pytest.rtinstall
packages/pytest/trunk/debian/python3-pytest.rtremove
packages/pytest/trunk/debian/rules
Deleted:
packages/pytest/trunk/debian/python-pytest.postrm
packages/pytest/trunk/debian/python-pytest.rtupdate
packages/pytest/trunk/debian/python3-pytest.postrm
packages/pytest/trunk/debian/python3-pytest.rtupdate
Modified: packages/pytest/trunk/debian/changelog
===================================================================
--- packages/pytest/trunk/debian/changelog 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/changelog 2012-06-22 12:06:53 UTC (rev 22245)
@@ -2,7 +2,7 @@
* Use rt{install, remove} mechanisms from the Python package to replace the
wrapper system. /usr/bin/py.test-X.Y will now be available only if the
- corresponding python package is installed.
+ corresponding python package is installed. Thanks to Jakub Wilk.
-- Simon Chopin <chopin.simon at gmail.com> Thu, 21 Jun 2012 23:30:23 +0200
Modified: packages/pytest/trunk/debian/python-pytest.postinst
===================================================================
--- packages/pytest/trunk/debian/python-pytest.postinst 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python-pytest.postinst 2012-06-22 12:06:53 UTC (rev 22245)
@@ -17,11 +17,11 @@
case "$1" in
configure|abort-upgrade|abort-remove|abort-deconfigure)
for version in `pyversions -vi`; do
- install -m 755 /usr/share/pytest/py.test.template "/usr/bin/py.test-$version"
- sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$version/" "/usr/bin/py.test-$version"
+ if [ $version ]; then
+ cp /usr/bin/py.test /usr/bin/py.test-$version
+ sed -i "s,#!/usr/bin/python,#!/usr/bin/python$version," "/usr/bin/py.test-$version"
+ fi
done
- rm -f /usr/bin/py.test
- ln -s /usr/bin/py.test-`pyversions -vd` /usr/bin/py.test
;;
*)
Deleted: packages/pytest/trunk/debian/python-pytest.postrm
===================================================================
--- packages/pytest/trunk/debian/python-pytest.postrm 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python-pytest.postrm 2012-06-22 12:06:53 UTC (rev 22245)
@@ -1,35 +0,0 @@
-#!/bin/sh
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <overwriter>
-# <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- rm -f /usr/bin/py.test-3.[0-9]
- rm -f /usr/bin/py.test-3
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Added: packages/pytest/trunk/debian/python-pytest.prerm
===================================================================
--- packages/pytest/trunk/debian/python-pytest.prerm (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.prerm 2012-06-22 12:06:53 UTC (rev 22245)
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+
+case "$1" in
+ remove|upgrade|deconfigure|failed-upgrade)
+ rm -f /usr/bin/py.test-2.[0-9]
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Modified: packages/pytest/trunk/debian/python-pytest.rtinstall
===================================================================
--- packages/pytest/trunk/debian/python-pytest.rtinstall 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python-pytest.rtinstall 2012-06-22 12:06:53 UTC (rev 22245)
@@ -2,6 +2,6 @@
set -e
PYVERSION="${2##*python}"
if [ ! -e "/usr/bin/py.test-$PYVERSION" ]; then
- install -m 755 /usr/share/pytest/py.test.template "/usr/bin/py.test-$PYVERSION"
- sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$PYVERSION/" /usr/bin/py.test-$PYVERSION
+ cp /usr/bin/py.test /usr/bin/py.test-$PYVERSION
+ sed -i "s,#!/usr/bin/python,#!/usr/bin/$2," /usr/bin/py.test-$PYVERSION
fi
Modified: packages/pytest/trunk/debian/python-pytest.rtremove
===================================================================
--- packages/pytest/trunk/debian/python-pytest.rtremove 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python-pytest.rtremove 2012-06-22 12:06:53 UTC (rev 22245)
@@ -1,6 +1,3 @@
#!/bin/sh
set -e
-PYVERSION="${2##*python}"
-if [ -e "/usr/bin/py.test-$PYVERSION" ]; then
- rm "/usr/bin/py.test-$PYVERSION"
-fi
+rm -f "/usr/bin/py.test-${2##*python}"
Deleted: packages/pytest/trunk/debian/python-pytest.rtupdate
===================================================================
--- packages/pytest/trunk/debian/python-pytest.rtupdate 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python-pytest.rtupdate 2012-06-22 12:06:53 UTC (rev 22245)
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-if [ "$1" = rtupdate ]; then
- PYVERSION="${3##*python}"
- rm -f /usr/bin/py.test
- ln -s "/usr/bin/py.test-$PYVERSION" /usr/bin/py.test
-fi
Modified: packages/pytest/trunk/debian/python3-pytest.postinst
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.postinst 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python3-pytest.postinst 2012-06-22 12:06:53 UTC (rev 22245)
@@ -18,11 +18,11 @@
configure|abort-upgrade|abort-remove|abort-deconfigure)
# Just in case, recreate all scripts
for version in `py3versions -vi`; do
- install -m 755 /usr/share/pytest/py.test-3.template "/usr/bin/py.test-$version"
- sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$version/" "/usr/bin/py.test-$version"
+ if [ $version ]; then
+ cp /usr/bin/py.test-3 /usr/bin/py.test-$version
+ sed -i "s,#!/usr/bin/python3,#!/usr/bin/python$version," "/usr/bin/py.test-$version"
+ fi
done
- rm -f /usr/bin/py.test-3
- ln -s /usr/bin/py.test-`py3versions -vd` /usr/bin/py.test-3
;;
*)
Deleted: packages/pytest/trunk/debian/python3-pytest.postrm
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.postrm 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python3-pytest.postrm 2012-06-22 12:06:53 UTC (rev 22245)
@@ -1,35 +0,0 @@
-#!/bin/sh
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <overwriter>
-# <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- rm -f /usr/bin/py.test-3.[0-9]
- rm -f /usr/bin/py.test-3
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Added: packages/pytest/trunk/debian/python3-pytest.prerm
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.prerm (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.prerm 2012-06-22 12:06:53 UTC (rev 22245)
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+
+case "$1" in
+ remove|upgrade|deconfigure|failed-upgrade)
+ rm -f /usr/bin/py.test-3.[0-9]
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Modified: packages/pytest/trunk/debian/python3-pytest.rtinstall
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.rtinstall 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python3-pytest.rtinstall 2012-06-22 12:06:53 UTC (rev 22245)
@@ -2,6 +2,6 @@
set -e
PYVERSION="${2##*python}"
if [ ! -e "/usr/bin/py.test-$PYVERSION" ]; then
- install -m 755 /usr/share/pytest/py.test-3.template "/usr/bin/py.test-$PYVERSION"
- sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$PYVERSION/" /usr/bin/py.test-$PYVERSION
+ cp /usr/bin/py.test-3 /usr/bin/py.test-$PYVERSION
+ sed -i "s,#!/usr/bin/python3,#!/usr/bin/$2," /usr/bin/py.test-$PYVERSION
fi
Modified: packages/pytest/trunk/debian/python3-pytest.rtremove
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.rtremove 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python3-pytest.rtremove 2012-06-22 12:06:53 UTC (rev 22245)
@@ -1,6 +1,3 @@
#!/bin/sh
set -e
-PYVERSION="${2##*python}"
-if [ -e "/usr/bin/py.test-$PYVERSION" ]; then
- rm "/usr/bin/py.test-$PYVERSION"
-fi
+rm -f "/usr/bin/py.test-${2##*python}"
Deleted: packages/pytest/trunk/debian/python3-pytest.rtupdate
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.rtupdate 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/python3-pytest.rtupdate 2012-06-22 12:06:53 UTC (rev 22245)
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-if [ "$1" = rtupdate ]; then
- PYVERSION="${3##*python}"
- rm -f /usr/bin/py.test-3
- ln -s "/usr/bin/py.test-$PYVERSION" /usr/bin/py.test-3
-fi
Modified: packages/pytest/trunk/debian/rules
===================================================================
--- packages/pytest/trunk/debian/rules 2012-06-22 10:20:51 UTC (rev 22244)
+++ packages/pytest/trunk/debian/rules 2012-06-22 12:06:53 UTC (rev 22245)
@@ -34,17 +34,17 @@
python setup.py install --skip-build --no-compile \
--root debian/python-pytest \
--install-layout=deb
- rm -rf debian/python-pytest/usr/bin/
- mkdir -p debian/python-pytest/usr/share/pytest
- install -m 644 debian/py.test.template debian/python-pytest/usr/share/pytest/py.test.template
- sed -i 's/#UPSTREAMVERSION#/$(UPSTREAM)/' debian/python-pytest/usr/share/pytest/py.test.template
+ rm debian/python-pytest/usr/bin/*
+ install -m 755 debian/py.test.template debian/python-pytest/usr/bin/py.test
+ sed -i 's/#UPSTREAMVERSION#/$(UPSTREAM)/' debian/python-pytest/usr/bin/py.test
+ sed -i 's,#PYSHEBANG#,#!/usr/bin/python,' debian/python-pytest/usr/bin/py.test
python3 setup.py install --skip-build --no-compile \
--root debian/python3-pytest \
--install-layout=deb
- rm -rf debian/python3-pytest/usr/bin/
- mkdir -p debian/python3-pytest/usr/share/pytest
- install -m 644 debian/py.test.template debian/python3-pytest/usr/share/pytest/py.test-3.template
- sed -i 's/#UPSTREAMVERSION#/$(UPSTREAM)/' debian/python3-pytest/usr/share/pytest/py.test-3.template
+ rm debian/python3-pytest/usr/bin/*
+ install -m 644 debian/py.test.template debian/python3-pytest/usr/bin/py.test-3
+ sed -i 's/#UPSTREAMVERSION#/$(UPSTREAM)/' debian/python3-pytest/usr/bin/py.test-3
+ sed -i 's,#PYSHEBANG#,#!/usr/bin/python3,' debian/python3-pytest/usr/bin/py.test-3
dh_install
override_dh_auto_clean:
More information about the Python-modules-commits
mailing list