[debhelper-devel] [debhelper] 03/09: dh_strip: Refactor a few lines

Niels Thykier nthykier at moszumanska.debian.org
Wed Jun 15 20:29:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit ea488551db0821b73af7f969db7373d2e1f06bb8
Author: Niels Thykier <niels at thykier.net>
Date:   Tue Jun 14 18:38:02 2016 +0000

    dh_strip: Refactor a few lines
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_strip | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dh_strip b/dh_strip
index 6ac0227..5222fe8 100755
--- a/dh_strip
+++ b/dh_strip
@@ -242,13 +242,13 @@ sub make_debug {
 	# stripped.
 	return unless get_file_type($file) =~ /not stripped/;
 
-	my ($base_file)=$file=~/^\Q$tmp\E(.*)/;
 	my ($debug_path, $debug_build_id);
 
 	if ($use_build_id &&
 	    `LC_ALL=C readelf -n $file`=~ /^\s+Build ID: ([0-9a-f]{2})([0-9a-f]+)$/m) {
 		$debug_path=$desttmp."/usr/lib/debug/.build-id/$1/$2.debug";
 		$debug_build_id="${1}${2}";
+		push(@build_ids, $debug_build_id);
 	}
 	elsif ($use_build_id > 1) {
 		# For dbgsyms, we need build-id (else it will not be
@@ -256,6 +256,7 @@ sub make_debug {
 		return;
 	}
 	else {
+		my ($base_file)=$file=~/^\Q$tmp\E(.*)/;
 		$debug_path=$desttmp."/usr/lib/debug/".$base_file;
 	}
 	my $debug_dir=dirname($debug_path);
@@ -270,10 +271,6 @@ sub make_debug {
 		doit($objcopy, "--only-keep-debug", "--compress-debug-sections", $file, $debug_path);
 	}
 
-	if ($use_build_id and defined($debug_build_id)) {
-		push(@build_ids, $debug_build_id);
-	}
-
 	# No reason for this to be executable.
 	doit("chmod", "0644", $debug_path);
 	return $debug_path;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list