Package: dh-make-perl
Version: 0.21
Severity: wishlist
Tags: patch
If apt-file isn't installed, or if apt-file can't find a dependency it needs I
would love for my make to FAIL, since either of these two things lead to a
package with incomplete dependency information = a broken package.
So I've introduced a command-line option that allows for that checking. See my
patch: I inroduced the --requiredeps option.
( I guessed that including this would be more acceptable than what maybe is the
better solution: To make apt-file a "Depends:" rather than a "Recommends:",
making --requiredeps the default behaviour and letting --notest print instead
of die. If you agree that this is the better solution and you would include
this instead, let me know and I'll submit such a patch instead )
Motivation: I've just tried to install a suite of stuff with just such a broken
package on many machines - failing miserably at run-time instead of at
package-installation time! My development server *had* apt-file installed and
updated, but our build server did not! I'd love for make to fail rather than
see the users' disappointed faces.
( now I'm hoping reportbug will allow me to attach a patch in one of the next
steps... :D )
-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15.lyta
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages dh-make-perl depends on:
ii debhelper 5.0.37.3 helper programs for debian/rules
ii dpkg-dev 1.13.21 package building tools for Debian
ii fakeroot 1.5.8 Gives a fake root environment
ii libmodule-depends-perl 0.10-1 identify the dependencies of a dis
ii libyaml-perl 0.57-2 YAML Ain't Markup Language (tm)
ii make 3.81-2 The GNU version of the "make" util
ii perl 5.8.8-4 Larry Wall's Practical Extraction
ii perl-modules [libpod-parser-p 5.8.8-4 Core Perl modules
Versions of packages dh-make-perl recommends:
ii apt-file 2.0.8 APT package searching utility -- c
pn libmodule-build-perl <none> (no description available)
-- no debconf information
--- /usr/bin/dh-make-perl 2006-03-08 21:21:50.000000000 +0100
+++ ./dh-make-perl 2006-08-08 14:07:41.000000000 +0200
@@ -160,7 +160,7 @@
my ($extrasfields, $extrapfields);
my (@docs, $changelog, @args);
my ($cpanmodule, $cpanplusmodule, $cpanmirror, $build, $install, $dbflags,
- $excludeRE, $notest, $nometa);
+ $excludeRE, $notest, $nometa, $requiredeps);
my $mod_cpan_version;
@@ -182,12 +182,13 @@
"install!" => \$install,
"notest" => \$notest,
"nometa" => \$nometa,
+ "requiredeps" => \$requiredeps,
) || die <<"USAGE";
Usage:
$0 [ --build ] [ --install ] [ SOURCE_DIR | --cpan MODULE ]
Other options: [ --desc DESCRIPTION ] [ --arch all|any ] [ --version VERSION ]
[ --cpan-mirror MIRROR ] [ --exclude|-i [REGEX] ] [ --notest ]
- [ --nometa]
+ [ --nometa ] [ --requiredeps ]
USAGE
$excludeRE = '(?:\/|^)(?:CVS|.svn)\/' if ($excludeRE && $excludeRE == 1);
@@ -610,12 +611,21 @@
push @not_debs, $module;
}
}
+ } elsif ( $requiredeps ) {
+ die "--requiredeps was specified, but apt-file was not found\n";
}
print "\n";
print "Needs the following debian packages: " . join (", ", @deps) .
"\n" if (@deps);
- print "Needs the following modules for which there are no debian
packages available: "
- . join (", ", @not_debs) . "\n" if (@not_debs);
+ if (@not_debs) {
+ my $missing_debs_str = "Needs the following modules for which
there are no debian packages available: "
+ . join (", ", @not_debs) . "\n";
+ if ( $requiredeps ) {
+ die $missing_debs_str;
+ } else {
+ print $missing_debs_str;
+ }
+ }
return join (", ", @deps);
}
@@ -893,6 +903,11 @@
Does not run the automatic testing of the module as part of the build script.
This is mostly useful when packaging buggy or incomplete software.
+=item B<--requiredeps>
+
+Fail if a dependency perl package was not found (dependency tracking
+requires the apt-file package installed and updated)
+
=back
=head1 DESCRIPTION