Package list debian-goodies / 0c68097
find-dbgsym-packages: Handle case when no such file was found So far, find-dbgsym-packages threw a rather confusing error message if called with a program name instead of a full path to a file: $ find-dbgsym-packages ls eu-readelf: cannot open input file: No such file or directory "eu-readelf" unexpectedly returned exit value 1 at /usr/bin/find-dbgsym-packages line 252. So let's do two things: * Proper warning when a file given on the commandline does not exist. * Check if the name given as parameter is an executable in $PATH if no such file exists. Use File::Which for this and add a Recommends on libfile-which-perl accordingly. Axel Beckert 3 years ago
3 changed file(s) with 31 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 debian-goodies (0.84) UNRELEASED; urgency=medium
1
2 * find-dbgsym-packages:
3 + Proper warning (instead of eu-readelf bailing out) when file given
4 on the commandline does not exist.
5 + Check if name given as parameter is an executable in $PATH if no
6 such file exists. Use File::Which for this and add a Recommends on
7 libfile-which-perl accordingly.
8
9 -- Axel Beckert <abe@debian.org> Sun, 18 Nov 2018 16:53:41 +0100
10
011 debian-goodies (0.83) unstable; urgency=medium
112
213 [ Jakub Wilk ]
1818 dctrl-tools,
1919 elfutils,
2020 libipc-system-simple-perl,
21 libfile-which-perl,
2122 man-db,
2223 perl,
2324 popularity-contest,
6869 [dctrl-tools]
6970 find-dbgsym-packages
7071 - Get list of dbgsym packages from core dump or PID [dctrl-tools,
71 elfutils, libipc-system-simple-perl]
72 elfutils, libfile-which-perl, libipc-system-simple-perl]
7273 popbugs - Display a customized release-critical bug list based on
7374 packages you use (using popularity-contest data) [python3,
7475 popularity-contest]
2424 use autodie qw(:all);
2525 use v5.14;
2626 use IPC::System::Simple qw(capturex $EXITVAL);
27 use File::Which;
2728
2829 $ENV{LC_ALL} = 'C';
2930
145146 sub get_build_ids_from_file
146147 {
147148 my ($filename) = @_;
149 if ($filename !~ m(/) and not -f $filename) {
150 my $oldfilename = $filename;
151 $filename = which($filename);
152 if (defined($filename)) {
153 warn "I: ./$oldfilename not found, using $filename instead\n";
154 } else {
155 warn "W: ./$oldfilename not found ".
156 "and no '$oldfilename' found in path either, skipping\n";
157 return qw();
158 }
159 }
160
161 unless (-f $filename) {
162 warn "W: $filename not found, skipping\n";
163 return qw();
164 }
165
148166 if (is_core_file($filename)) {
149167 return get_build_ids_from_core($filename);
150168 } else {