as independent files in the package build directory of the specified debugging
package.
-For example, if your packages are lifoo and foo and you want to include a
+For example, if your packages are libfoo and foo and you want to include a
foo-dbg package with debugging symbols, use dh_strip --dbg-package=foo-dbg.
Note that this option behaves significantly different in debhelper
should have separated debug symbols, and the separated symbols are placed
in packages with "-dbg" added to their name.
-Note that if you use this option, your package should build-depend on
-binutils (>= 2.14.90.0.7).
-
=item B<-k>, B<--keep-debug>
Debug symbols will be retained, but split into an independent
file in usr/lib/debug/ in the package build directory. --dbg-package
is easier to use than this option, but this option is more flexible.
-Note that if you use this option, your package should build-depend on
-binutils (>= 2.12.90.0.9).
-
=back
=head1 NOTES
If the DEB_BUILD_OPTIONS environment variable contains "nostrip", nothing
-will be stripped, in accordance with Debian policy.
+will be stripped, in accordance with Debian policy (section 10.1
+"Binaries").
=head1 CONFORMS TO
if (! -d $debug_dir) {
doit("install", "-d", $debug_dir);
}
- doit("objcopy", "--only-keep-debug", $file, $debug_path);
+ if (! -e $debug_path) {
+ doit("objcopy", "--only-keep-debug", $file, $debug_path);
+ }
# No reason for this to be executable.
doit("chmod", 644, $debug_path);
return $debug_path;
$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 {