]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1611: * dh_install: add --fail-missing option. Closes: #120026 version_4.1.75
authorjoey <joey>
Mon, 13 Oct 2003 01:37:14 +0000 (01:37 +0000)
committerjoey <joey>
Mon, 13 Oct 2003 01:37:14 +0000 (01:37 +0000)
   * Fix mispelling in prerm-sgmlcatalog. Closes: #215189

Debian/Debhelper/Dh_Getopt.pm
autoscripts/prerm-sgmlcatalog
debian/changelog
dh_install
dh_python

index 364187a12b9b440b97695fbb86abfef45f120cd3..7d82eea5b92525956c83eb8036bec57b553deede 100644 (file)
@@ -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},
                
index cf1db218d474e834b5e75287ba113c1323ccb962..d6f6fa7afa18ad032266ccb0374eaeec6ec0a124 100644 (file)
@@ -1,3 +1,3 @@
-if [ "$1" = "remove" ] || [ "$1" = "uograde" ]; then
+if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then
        update-catalog --quiet --remove --super #CENTRALCAT#
 fi
index 4210254bcf10d7e763e5ad141272496f90cc41e4..6aa2110a40710e2290231eee087ba8c5402a0c2f 100644 (file)
@@ -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 <joeyh@debian.org>  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
index 57851678107ac4c1ac1e7f351f8d39f361bfccb4..779b9d6e73564033aa3b63d5c840a16654cff801 100755 (executable)
@@ -12,7 +12,7 @@ use Debian::Debhelper::Dh_Lib;
 
 =head1 SYNOPSIS
 
-B<dh_install> [B<-X>I<item>] [B<--autodest>] [B<--list-missing>] [B<--sourcedir=>I<dir>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
+B<dh_install> [B<-X>I<item>] [B<--autodest>] [B<--sourcedir=>I<dir>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
 
 =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");
+               }
        }
 }
 
index 5c19ef7d4acbe3f9433600b02296a6fc1c9eb81d..02afea89a7fdfa20be35ecdf8d0342ebee5253f1 100755 (executable)
--- 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+)*/) {