[Reproducible-commits] [debhelper] 01/33: dh_builddeb: Skip ddebs without control files
Mattia Rizzolo
mattia at mapreri.org
Sun Jun 28 13:15:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
mapreri-guest pushed a commit to branch pu/reproducible_builds
in repository debhelper.
commit e8c0c44d703b501483b3f2cbfefcb71d490d7608
Author: Niels Thykier <niels at thykier.net>
Date: Wed May 20 08:51:51 2015 +0200
dh_builddeb: Skip ddebs without control files
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_builddeb | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/dh_builddeb b/dh_builddeb
index c827f2f..3eb0811 100755
--- a/dh_builddeb
+++ b/dh_builddeb
@@ -117,14 +117,22 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
if ( -d $ddeb_tmpdir) {
- my $ddeb_filename = '/' . ddeb_filename($package);
- # XXX: Should we blindly overrule the maintainer here? It is
- # not apparent that their explicit -z was intended for the
- # ddeb.
- my @args = default_compressor_args(["-z1", "-Zxz", "-Sextreme"],
- @{$dh{U_PARAMS}});
- doit("dpkg-deb", @args,
- "--build", $ddeb_tmpdir, $dh{DESTDIR}.$ddeb_filename);
+ my $ddeb_control = "${ddeb_tmpdir}/DEBIAN/control";
+ # Only build the ddeb if it has a control file. People might
+ # have skipped dh_gencontrol.
+ if ( -f $ddeb_control ) {
+ my $ddeb_filename = '/' . ddeb_filename($package);
+ # XXX: Should we blindly overrule the maintainer here? It
+ # is not apparent that their explicit -z was intended for
+ # the ddeb.
+ my @args = default_compressor_args(["-z1", "-Zxz", "-Sextreme"],
+ @{$dh{U_PARAMS}});
+ doit("dpkg-deb", @args,
+ "--build", $ddeb_tmpdir, $dh{DESTDIR}.$ddeb_filename);
+ } else {
+ warning("Not building ddeb for ${package} as it has no control file");
+ warning("Please use dh_gencontrol to avoid this issue");
+ }
}
if (! is_udeb($package)) {
doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git
More information about the Reproducible-commits
mailing list