Package: perl
Version: 5.10.0-19
Severity: minor
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jaunty ubuntu-patch

Hi!

While working on Perl updates in Ubuntu, I ran head-long into Debian
bug 479762.  Thanks to the h2ph patch, things are much improved.  However,
I wanted to also include a test to avoid this kind of regression from
happening in the future.  What do you think of the follow patch to
debian/rules to validate the produced .ph files?

Thanks,

-Kees

-- 
Kees Cook                                            @debian.org
diff -u perl-5.8.8/debian/rules perl-5.8.8/debian/rules
--- perl-5.8.8/debian/rules
+++ perl-5.8.8/debian/rules
@@ -102,6 +102,13 @@
 	# simple wrapper around Errno module
 	cp debian/errno.ph $(lib)
 
+	# Verify that the headers are usable
+	for ph in `cat $(srcdir)/debian/headers | sed -e 's/\.h$$/.ph/'`; do \
+		$(srcdir)/perl.static -I $(srcdir)/$(lib) -e \
+			"print '"$$ph": '; require '"$$ph"'; print \"ok\n\";" \
+				|| exit 1; \
+	done
+
 	# remove some cruft
 	rm -f $(bin)/suidperl
 	rm -f $(lib)/.packlist

Reply via email to