Merge lp:~mitya57/ubuntu/trusty/python-coverage/add-preinst-script into lp:ubuntu/trusty/python-coverage

Proposed by Dmitry Shachnev
Status: Merged
Merged at revision: 23
Proposed branch: lp:~mitya57/ubuntu/trusty/python-coverage/add-preinst-script
Merge into: lp:ubuntu/trusty/python-coverage
Diff against target: 59 lines (+47/-0)
2 files modified
debian/changelog (+9/-0)
debian/python3-coverage.preinst (+38/-0)
To merge this branch: bzr merge lp:~mitya57/ubuntu/trusty/python-coverage/add-preinst-script
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+202323@code.launchpad.net

Description of the change

This fixes Saucy→Trusty upgrades (the problem was described at http://bugs.debian.org/734850, but actually it's Ubuntu-specific problem, and the fix is not needed in Debian).

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

As we have two supported python3 versions, you might need this excerpt in the preinst too:

   for python in $(py3versions --supported) ; do

......

review: Needs Fixing
Revision history for this message
Daniel Holbach (dholbach) wrote :

Sorry, ignore the last comment please.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks. Uploaded.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-01-13 14:51:52 +0000
+++ debian/changelog 2014-01-20 15:19:50 +0000
@@ -1,3 +1,12 @@
1python-coverage (3.7+dfsg.1-4ubuntu1) trusty; urgency=medium
2
3 * Add python3-coverage.preinst (based on existing python-coverage.preinst)
4 to correctly handle upgrades from previous releases. Previously
5 /usr/lib/python3/dist-packages/coverage/htmlfiles was a directory,
6 now it is a symbolic link (see Debian #734850).
7
8 -- Dmitry Shachnev <mitya57@ubuntu.com> Mon, 20 Jan 2014 19:08:47 +0400
9
1python-coverage (3.7+dfsg.1-4) unstable; urgency=medium10python-coverage (3.7+dfsg.1-4) unstable; urgency=medium
211
3 * The “Thorpekai Yousafzai” release.12 * The “Thorpekai Yousafzai” release.
413
=== added file 'debian/python3-coverage.preinst'
--- debian/python3-coverage.preinst 1970-01-01 00:00:00 +0000
+++ debian/python3-coverage.preinst 2014-01-20 15:19:50 +0000
@@ -0,0 +1,38 @@
1#! /bin/sh
2# Pre-install script for ‘python3-coverage’.
3#
4# Manpage: ‘dh_installdeb(1)’
5
6set -e
7
8# Summary of ways this script can be called:
9# * <new-preinst> install
10# * <new-preinst> install <old-version>
11# * <new-preinst> upgrade <old-version>
12# * <old-preinst> abort-upgrade <new-version>
13# For details, see the Debian Policy §6.5 in the ‘debian-policy’ package
14# or on the web at <URL:http://www.debian.org/doc/debian-policy/>.
15
16action="$1"
17
18case "$action" in
19 upgrade)
20 htmlfiles_dir="/usr/lib/python3/dist-packages/coverage/htmlfiles"
21 if [ -d "$htmlfiles_dir" ] && [ ! -L "$htmlfiles_dir" ] ; then
22 # The ‘htmlfiles’ location should be platform-independent.
23 # The new package will replace the directory with a symlink.
24 rm -rf "$htmlfiles_dir"
25 fi
26 ;;
27
28 install|abort-upgrade)
29 ;;
30
31 *)
32 printf "preinst called with unknown action ‘%s’\n" "$action" >&2
33 exit 1
34 ;;
35
36esac
37
38#DEBHELPER#

Subscribers

People subscribed via source and target branches