Source: libselinux
Version: 2.2.2-1
Severity: wishlist
Tags: patch

When I try doing DEB_STAGE=stage1 dpkg-buildpackage -d -b -uc in a chroot 
without python or ruby (or swig) installed, I get:

 debian/rules clean
dh: unable to load addon python2: Can't locate 
Debian/Debhelper/Sequence/python2.pm in @INC (you may need to install the 
Debian::Debhelper::Sequence::python2 module) (@INC contains: /etc/perl 
/usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 
/usr/local/lib/site_perl .) at (eval 13) line 2.
BEGIN failed--compilation aborted at (eval 13) line 2.

make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

I've attached a patch which fixes this and lets the package bootstrap properly.
-- 
Daniel Schepler
diff -urN libselinux-2.1.13.old/debian/rules libselinux-2.1.13/debian/rules
--- libselinux-2.1.13.old/debian/rules	2013-05-20 08:36:43.000000000 -0700
+++ libselinux-2.1.13/debian/rules	2013-05-30 11:41:14.966724020 -0700
@@ -36,7 +36,11 @@
 ## By default, pass everything through debhelper automatically
 export DH_OPTIONS
 %: FORCE
+ifeq ($(DEB_STAGE),stage1)
+	@dh $@
+else
 	@dh $@ --with=python2,ruby
+endif
 
 ## Don't try to rebuild the debian/rules file
 debian/rules:

Reply via email to