]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_strip
r2027: * dh_strip: Check that --dbg-package lists the name of a real package.
[debhelper.git] / dh_strip
index ef91d65139abaaea6841ce88021502f71bfa7749..2c7f3d8f45097cb15646987f1ede0e30a9255d0f 100755 (executable)
--- a/dh_strip
+++ b/dh_strip
@@ -181,7 +181,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        $keep_debug=1;
                        # Note that it's only an array for the v4 stuff;
                        # for v5 only one value is used.
-                       $debugtmp=tmpdir(@{$dh{DEBUGPACKAGES}}[0]);
+                       my $debugpackage=@{$dh{DEBUGPACKAGES}}[0];
+                       if (! grep { $_ eq $debugpackage } getpackages()) {
+                               error("debug package $debugpackage is not listed in the control file");
+                       }
+                       $debugtmp=tmpdir($debugpackage);
                }
        }
        else {