diff options
author | Niels Thykier <niels@thykier.net> | 2016-10-02 20:11:34 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2016-10-02 20:11:37 +0000 |
commit | dbdad391cc62fc92f54d8f9eab1f4bc68c1073cb (patch) | |
tree | 3a9a8a913bbef2549e0b40b089cbb43179ab90a6 /dh_strip | |
parent | 56e7dc4f2a6b47007364ec7f4e3dee1eba2f21c8 (diff) | |
download | debhelper-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-x | dh_strip | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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: $!"); |