dh_python3 generates incorrect prerm script which cannot remove .pyc files

Bug #760401 reported by IRIE Shinsuke
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3-defaults (Debian)
Fix Released
Unknown
python3-defaults (Ubuntu)
Fix Released
High
Scott Kitterman

Bug Description

I use dh_python3 in python3 3.2-1.

When building deb package which uses python3 and includes only private modules, dh_python3 incorrectly inserts prerm-pyclean into the prerm scripts instead of prerm-py3clean:

============================================================
#!/bin/sh
set -e

# Automatically added by dh_python3:
if which pyclean >/dev/null 2>&1; then
 pyclean -p blender2.5
else
 dpkg -L blender2.5 | grep \.py$ | while read file
 do
  rm -f "${file}"[co] >/dev/null
   done
fi

# End automatically added section
============================================================

So, when upgrading my package using dh_python3, I got many warnings and many unnecessary .pyc files remained in my system.

I also tested python3 3.2-2 which was taken from Debian sid, and confirmed that the bug is still in the upstream latest version.

I have already reported this bug at Debian bug tracker and posted a patch.

Tags: patch
Revision history for this message
IRIE Shinsuke (irie) wrote :
Changed in python3-defaults (Ubuntu):
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → High
status: New → In Progress
Changed in python3-defaults (Ubuntu):
status: In Progress → Fix Committed
IRIE Shinsuke (irie)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3-defaults - 3.2-1ubuntu1

---------------
python3-defaults (3.2-1ubuntu1) natty; urgency=low

  * Use prerm-py3clean instead of prerm-pyclean in prerm scripts (LP: #760401)
    - Thanks to IRIE Shinsuke for the patch
 -- Scott Kitterman <email address hidden> Thu, 14 Apr 2011 16:26:01 -0400

Changed in python3-defaults (Ubuntu):
status: Fix Committed → Fix Released
Changed in python3-defaults (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.