[debhelper-devel] Debhelper patch for supporting Build-Profiles field
Johannes Schauer
j.schauer at email.de
Thu Feb 20 10:49:27 UTC 2014
Hi Daniel and Joey,
Quoting Daniel Schepler (2014-02-11 04:31:22)
> Here's the latest version of the patch with your suggested updates -- this
> time against debhelper git. (It excludes the autogenerated changes in po4a
> files.)
I just tried out Daniel's patch and was not successful when I used it for
packages with more than one binary package stanza in debian/control.
The relevant parts of debian/control in my test source package:
--%<---------------------------------------------------------------------------
Package: builds-only-stage1
Architecture: all
Depends: ${misc:Depends}
Build-Profiles: stage1
Description: test for build profiles (only stage1)
This package will only build with the build profile stage1 activated
Package: builds-not-stage1
Architecture: all
Depends: ${misc:Depends}
Build-Profiles: !stage1
Description: test for build profiles (without stage1)
This package will only build with the build profile stage1 deactivated
-->%---------------------------------------------------------------------------
When trying to build this I got:
dpkg-gencontrol: error: must specify package since control info has many (builds-only-stage1 builds-not-stage1)
dh_gencontrol: dpkg-gencontrol -ldebian/changelog -Tdebian/builds-only-stage1.substvars -Pdebian/builds-only-stage1 returned exit code 255
The following change to debhelper fixed my problem:
diff --git a/dh_gencontrol b/dh_gencontrol
index 32b8563..5d02445 100755
--- a/dh_gencontrol
+++ b/dh_gencontrol
@@ -66,9 +66,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Generate and install control file.
my @command="dpkg-gencontrol";
- if (getpackages() > 1) {
- push @command, "-p$package";
- }
+ push @command, "-p$package";
doit(@command, "-l$changelog", "-T$substvars",
"-P$tmp",@{$dh{U_PARAMS}});
Maybe this is not the correct fix, but I wanted to bring up the issue before
the next debhelper version is released.
Thanks for both your work!
cheers, josch
More information about the debhelper-devel
mailing list