[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#519966: hplip-data package contains .pyc files because of wrong dh_python



Package: hplip-data
Version: 3.9.2-1
Severity: serious
Justification: python policy 2.6
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch jaunty

Running 'debsums -s' on my system, I found a large number of checksum
mismatches for files under /usr/share/hplip.  The reason for this is that
hplip-data incorrectly ships a number of .pyc files within the package,
which has been a violation of python packaging policy as long as there has
been a python packaging policy.

The debian/rules for some reason calls dh_pysupport for the Architecture:
any packages, when hplip-data, containing the .py files, is an arch: all
package.  The attached patch fixes this so that the .py files are actually
registered with python-support.

The hplip.preinst code to remove all .pyc and .pyo files on upgrade of the
*hplip* package is probably also unnecessary with this change.  (Even if
it's not unnecessary, it is wrong.  The hplip package shouldn't be doing
anything with .pyc files originating with another binary package.)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
diff -Nru hplip-3.9.2/debian/changelog hplip-3.9.2/debian/changelog
--- hplip-3.9.2/debian/changelog	2009-03-16 13:46:37.000000000 +0000
+++ hplip-3.9.2/debian/changelog	2009-03-16 13:46:39.000000000 +0000
@@ -1,3 +1,17 @@
+hplip (3.9.2-1ubuntu3) jaunty; urgency=low
+
+  * Also add missing ${python:Depends} to hplip-data.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Mon, 16 Mar 2009 13:30:57 +0000
+
+hplip (3.9.2-1ubuntu2) jaunty; urgency=low
+
+  * The python scripts are in hplip-data - call dh_pysupport -i, not
+    dh_pysupport -a, so we don't end up shipping .pyc files in the
+    package!
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Mon, 16 Mar 2009 12:50:52 +0000
+
 hplip (3.9.2-1ubuntu1) jaunty; urgency=low
 
   [ Till Kamppeter ]
diff -Nru hplip-3.9.2/debian/control hplip-3.9.2/debian/control
--- hplip-3.9.2/debian/control	2009-03-16 13:46:37.000000000 +0000
+++ hplip-3.9.2/debian/control	2009-03-16 13:46:39.000000000 +0000
@@ -54,7 +54,7 @@
 Package: hplip-data
 Architecture: all
 Recommends: hplip
-Depends: python
+Depends: ${python:Depends}
 Description: HP Linux Printing and Imaging - data files
  This package contains data files for the HP Linux Printing and
  Imaging System.
diff -Nru hplip-3.9.2/debian/rules hplip-3.9.2/debian/rules
--- hplip-3.9.2/debian/rules	2009-03-16 13:46:37.000000000 +0000
+++ hplip-3.9.2/debian/rules	2009-03-16 13:46:39.000000000 +0000
@@ -326,8 +326,8 @@
 	dh_compress -i
 	dh_fixperms -i
 #	dh_perl -i
-#	dh_pysupport -i
-#	dh_python -i /usr/share/hplip
+	dh_pysupport -i /usr/share/hplip
+	dh_python -i /usr/share/hplip
 #	dh_makeshlibs -i
 	dh_installdeb -i
 	dh_shlibdeps -i --dpkg-shlibdeps-params=--ignore-missing-info
@@ -362,8 +362,6 @@
 	dh_installman -a
 #	dh_installinfo -a
 	dh_installchangelogs -a $(CHANGELOG)
-	dh_pysupport -a /usr/share/hplip
-	dh_python -a /usr/share/hplip
 	# must come after dh_pysupport and dh_python, or the postinst
 	# ordering will be screwed up and break.
 	#dh_installinit -phplip --init-script=hplip -- multiuser 19

Reply to: