Control: found -1 0.82
* Jakub Wilk <jw...@jwilk.net>, 2018-09-22, 11:31:
$ find-dbgsym-packages /bin/ls
eu-unstrip: linux-gate.so.1: No such file or directory
"eu-unstrip" unexpectedly returned exit value 1 at 
/usr/bin/find-dbgsym-packages line 162.

Hmpf. So my patch didn't fix this.
Either I only dreamt that I tested it, or I accidentally tested in amd64 env, where it indeed works perfectly.
Anyway, I'm attaching another patch that really fixes the bug.
Now let me put brown paper bag on my head...

--
Jakub Wilk
From cfe13a2c860ef4a10722a5055330bb64bbe0f83c Mon Sep 17 00:00:00 2001
From: Jakub Wilk <jw...@jwilk.net>
Date: Mon, 24 Sep 2018 09:33:29 +0200
Subject: [PATCH] find-dbgsym-packages: Use the same vDSO regexp everywhere

Fixes: ed7eec90e450b52f9df52c53a6ca817bb16b116d

Really closes: #909357
---
 find-dbgsym-packages | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/find-dbgsym-packages b/find-dbgsym-packages
index 3e2ac21..318114d 100755
--- a/find-dbgsym-packages
+++ b/find-dbgsym-packages
@@ -32,6 +32,8 @@ if (scalar @ARGV == 0 or $ARGV[0] eq '--help' or $ARGV[0] eq '-h') {
     usage();
 }
 
+my $vdso_regexp = qr/^linux-(gate|vdso\d*)[.]so[.]/;
+
 my %pkgs;
 foreach my $arg (@ARGV) {
     my %build_ids;
@@ -44,7 +46,7 @@ foreach my $arg (@ARGV) {
     foreach my $id (keys %build_ids) {
         my ($path, $name) = @{$build_ids{$id}};
 
-        next if $name =~ /^linux-(gate|vdso\d*)[.]so[.]/;
+        next if $name =~ $vdso_regexp;
 
         my @p = get_debs_from_id($id);
         if (scalar @p == 0) {
@@ -149,7 +151,7 @@ sub get_build_ids_from_file
         my @filenames = get_files_from_elf($filename);
         my %build_ids;
         foreach my $filename (@filenames) {
-            next if $filename =~ /^linux-vdso\.so\./;
+            next if $filename =~ $vdso_regexp;
             %build_ids = (%build_ids, get_build_ids_from_elf($filename));
         }
         return %build_ids;
-- 
2.19.0

Reply via email to