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

Bug#657047: Is this FTBFS reproducible on hplip/3.12.2-1?



tags 657047 + patch
thanks

Le 18/02/2012 à 19:06, Ronny Standtke <ronny.standtke@fhnw.ch> écrivit :
> > I came across this bug during the Paris BSP, and I could reproduce it in
> > hplip/3.11.12-2. In the meantime, the maintainer made an upload of a new
> > upstream release (hplip/3.12.2-1), and I can't reproduce the failure
> > anymore.
> > 
> > Would you care to check if you can reproduce the build failure?
> 
> I just tried backporting hplip-3.12.2-1 to squeeze and the bug is
> still there when trying to build the package within a clean pbuilder
> chroot.

The attached patch should fix the build issue. The logic is : if
readlink -f fails, then the link is absolute and the file is to be found
in debian/tmp.

This logic fixed the issue in the previous version of the package.

Please test the patch and report back.

Thanks,
-- 
Nicolas Dandrimont
diff -u hplip-3.12.2/debian/rules hplip-3.12.2/debian/rules
--- hplip-3.12.2/debian/rules
+++ hplip-3.12.2/debian/rules
@@ -268,8 +268,12 @@
 	ln -s /usr/share/hplip/hpssd.py ./debian/tmp/usr/sbin/hpssd
 
 	# Correct Python interpreter path in all executables
-	for file in ./debian/tmp/usr/bin/* ./debian/tmp/usr/sbin/* ./debian/tmp/usr/lib/cups/*/*; do \
-	    perl -p -i -e 's:^\s*\#\!/usr/bin/env\s+python.*:#!/usr/bin/python:' `readlink -f $$file`; \
+	set -e; for file in ./debian/tmp/usr/bin/* ./debian/tmp/usr/sbin/* ./debian/tmp/usr/lib/cups/*/*; do \
+	    linkedfile=`readlink -f $$file || true`; \
+	    if test -z $$linkedfile; then \
+	        linkedfile=$(CURDIR)/debian/tmp/`readlink $$file`; \
+	    fi; \
+	    perl -p -i -e 's:^\s*\#\!/usr/bin/env\s+python.*:#!/usr/bin/python:' $$linkedfile; \
 	done
 
 	# Remove all *.pyc files, they do not need to be shipped with the
diff -u hplip-3.12.2/debian/changelog hplip-3.12.2/debian/changelog
--- hplip-3.12.2/debian/changelog
+++ hplip-3.12.2/debian/changelog
@@ -1,3 +1,10 @@
+hplip (3.12.2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS in pbuilder (Closes: #657047)
+
+ -- Nicolas Dandrimont <nicolas.dandrimont@crans.org>  Sat, 18 Feb 2012 19:40:06 +0100
+
 hplip (3.12.2-1) unstable; urgency=low
 
   * New Upstream Release

Reply to: