summaryrefslogtreecommitdiff
path: root/dh_strip
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-10-02 20:11:34 +0000
committerNiels Thykier <niels@thykier.net>2016-10-02 20:11:37 +0000
commitdbdad391cc62fc92f54d8f9eab1f4bc68c1073cb (patch)
tree3a9a8a913bbef2549e0b40b089cbb43179ab90a6 /dh_strip
parent56e7dc4f2a6b47007364ec7f4e3dee1eba2f21c8 (diff)
downloaddebhelper-dbdad391cc62fc92f54d8f9eab1f4bc68c1073cb.tar.gz
Refactor install_dir usage to avoid the "if -d " tests
They were not needed in the first place (as "install -d" DTRT). Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_strip')
-rwxr-xr-xdh_strip8
1 files changed, 3 insertions, 5 deletions
diff --git a/dh_strip b/dh_strip
index 7161cc5d..7a16750a 100755
--- a/dh_strip
+++ b/dh_strip
@@ -272,9 +272,7 @@ sub make_debug {
$debug_path=$desttmp."/usr/lib/debug/".$base_file;
}
my $debug_dir=dirname($debug_path);
- if (! -d $debug_dir) {
- install_dir($debug_dir);
- }
+ install_dir($debug_dir);
if (compat(8) && $use_build_id < 2) {
doit($objcopy, "--only-keep-debug", $file, $debug_path);
}
@@ -369,7 +367,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $dbgsym_docdir = "${debugtmp}/usr/share/doc";
my $doc_symlink = "${dbgsym_docdir}/${package}-dbgsym";
if ( not -l $doc_symlink and not -e $doc_symlink ) {
- install_dir($dbgsym_docdir) if not -d $dbgsym_docdir;
+ install_dir($dbgsym_docdir);
doit('ln', '-s', $package, $doc_symlink);
}
if ($dh{MIGRATE_DBGSYM}) {
@@ -388,7 +386,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$dir = "debian/.debhelper/${dbg_pkg}";
}
$path = "${dir}/dbgsym-build-ids";
- install_dir($dir) if ! -d $dir;
+ install_dir($dir);
open(my $fd, '>>', $path) or error("open $path failed: $!");
print {$fd} join(q{ }, sort(@build_ids)) . "\n";
close($fd) or error("close $path failed: $!");