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

Re: Growing file lists after python2.7 rebuild



[This is a copy of what I sent to #702005 (after unarchiving it), which didn't show up on bugs.d.o yet.]

According to python2.7-minimal's README.Debian, the _ssl and _hashlib are supposed to be included in the -minimal package. python2.7-minimal_2.7.3-6_amd64.deb indeed includes them both, but on every other architecture they are shipped in python2.7.

Worse, if you rebuild wheezy's src:python2.7 in a clean environment, the modules move to python2.7, likely leading to upgrade problem similar to that reported a while ago:

* Vincent Lefevre <vincent@vinc17.net>, 2013-03-01, 17:00:
Unpacking replacement python2.7 ...
dpkg: error processing /var/cache/apt/archives/python2.7_2.7.3-7_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python2.7/lib-dynload/_hashlib.so', which is also in package python2.7-minimal 2.7.3-6
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)


I believe the bug lies in the following part of debian/rules:

	DH_COMPAT=2 dh_movefiles -p$(p_min) --sourcedir=$(d) \
		usr/bin/python$(VER) \
		usr/share/man/man1/python$(VER).1 \
		$(foreach i,$(MIN_MODS),$(scriptdir)/$(i).py) \
		$(foreach i,$(MIN_PACKAGES),$(scriptdir)/$(i)) \
		$(foreach i,$(MIN_ENCODINGS),$(scriptdir)/$(i)) \
		$(scriptdir)/config/Makefile \
		usr/include/$(PVER)/pyconfig.h \
		$(scriptdir)/site.py \
		$(shell cd $(d); for i in $(MIN_EXTS); do \
			test -e $(scriptdir)/lib-dynload/$$i.so \
			  && echo $(scriptdir)/lib-dynload/$$i.so; \
		  done; true)

The culprit appears to be that make expands $(shell ... ) too early, when no *.so files exist yet.

Replacing $(shell ... ) with $$( ... ), and then adding appropriate Breaks+Replaces should fix this bug. (I haven't tested the proposed fix in practice yet.)

It still don't understand why this bug didn't trigger for the amd64 package. Perhaps the build log could shed some light on it.

--
Jakub Wilk


Reply to: