dh_python2 prerm snippet should be simplified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-defaults (Ubuntu) |
New
|
Low
|
Barry Warsaw |
Bug Description
dh_python2 sets a versioned dependency on python (>= 2.7.1-0ubuntu2 with the explanation:
# minimum version required for pycompile/pyclean
But dh_python2 also installs this prerm snippet:
if which pyclean >/dev/null 2>&1; then
pyclean -p #PACKAGE# #ARGS#
else
dpkg -L #PACKAGE# | grep \.py$ | while read file
do
rm -f "${file}"[co] >/dev/null
done
fi
This should be simplified to just 'pyclean -p #PACKAGE# #ARGS#' - since we have a dependency that ensures pyclean is present, we don't need to check for it in the prerm because our prerm will be called already before python can possibly be removed from the system.
The same applies to the postinst snippet, which checks for pycompile where it doesn't need to.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: python 2.6.6-2ubuntu2
ProcVersionSign
Uname: Linux 2.6.35-25-generic x86_64
Architecture: amd64
Date: Thu Feb 3 11:50:42 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
PackageArchitec
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: python-defaults
tags: | added: pycentral-deprecation |