From 8d285c73f8a1d8f4b632100ce764893f3d704068 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 13 Oct 2003 01:37:14 +0000 Subject: r1611: * dh_install: add --fail-missing option. Closes: #120026 * Fix mispelling in prerm-sgmlcatalog. Closes: #215189 --- Debian/Debhelper/Dh_Getopt.pm | 2 ++ autoscripts/prerm-sgmlcatalog | 2 +- debian/changelog | 7 +++++++ dh_install | 15 +++++++++++---- dh_python | 2 +- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index 364187a1..7d82eea5 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -146,6 +146,8 @@ sub parseopts { "mainpackage=s" => \$options{MAINPACKAGE}, "list-missing" => \$options{LIST_MISSING}, + + "fail-missing" => \$options{FAIL_MISSING}, "L|libpackage=s" => \$options{LIBPACKAGE}, diff --git a/autoscripts/prerm-sgmlcatalog b/autoscripts/prerm-sgmlcatalog index cf1db218..d6f6fa7a 100644 --- a/autoscripts/prerm-sgmlcatalog +++ b/autoscripts/prerm-sgmlcatalog @@ -1,3 +1,3 @@ -if [ "$1" = "remove" ] || [ "$1" = "uograde" ]; then +if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then update-catalog --quiet --remove --super #CENTRALCAT# fi diff --git a/debian/changelog b/debian/changelog index 4210254b..6aa2110a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (4.1.75) unstable; urgency=low + + * dh_install: add --fail-missing option. Closes: #120026 + * Fix mispelling in prerm-sgmlcatalog. Closes: #215189 + + -- Joey Hess Fri, 10 Oct 2003 22:12:59 -0400 + debhelper (4.1.74) unstable; urgency=low * Only list dh_installman once in example rules.indep. Closes: #211567 diff --git a/dh_install b/dh_install index 57851678..779b9d6e 100755 --- a/dh_install +++ b/dh_install @@ -12,7 +12,7 @@ use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS -B [B<-X>I] [B<--autodest>] [B<--list-missing>] [B<--sourcedir=>I] [S>] [S>] +B [B<-X>I] [B<--autodest>] [B<--sourcedir=>I] [S>] [S>] =head1 DESCRIPTION @@ -79,6 +79,11 @@ you don't miss installing newly added files in new upstream releases. Note that files that are excluded from being moved via the -X option are not warned about. +=item B<--fail-missing> + +This option is like --list-missing, except if a file was missed, it will +not only list the missing files, but also fail with a nonzero exit code. + =item B<--sourcedir=dir> Makes all source files be found under dir. If this is specified, it is @@ -154,7 +159,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } # Keep track of what's installed. - if ($dh{LIST_MISSING}) { + if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) { # Kill any extra slashes. Makes the # @installed stuff more robust. $src=~y:/:/:s; @@ -184,8 +189,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } } -if ($dh{LIST_MISSING}) { - +if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) { # . as srcdir makes no sense, so this is a special case. if ($srcdir eq '.') { $srcdir='debian/tmp'; @@ -201,6 +205,9 @@ if ($dh{LIST_MISSING}) { }, $srcdir); if (@missing) { warning "$_ exists in debian/tmp but not installed to anywhere" foreach @missing; + if ($dh{FAIL_MISSING}) { + error("missing files, aborting"); + } } } diff --git a/dh_python b/dh_python index 5c19ef7d..02afea89 100755 --- a/dh_python +++ b/dh_python @@ -75,7 +75,7 @@ my $python = 'python'; # The current python major version my $python_major; my $python_version = `$python -V 2>&1`; -if ("$python_version" eq "") { +if (! defined $python_version || $python_version eq "") { error("Python is not installed, aborting. (Probably forgot to Build-Depend on python.)"); } elsif ($python_version =~ m/^Python\s+(\d+)\.(\d+)(\.\d+)*/) { -- cgit v1.2.3