Codebase list debian-goodies / 54c3b51
Prefix all messages to STDERR with either "E:", "W:", or "I:" Axel Beckert 5 years ago
2 changed file(s) with 8 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
55 + Check if name given as parameter is an executable in $PATH if no
66 such file exists. Use File::Which for this and add a Recommends on
77 libfile-which-perl accordingly.
8 + Prefix all messages to STDERR with either "E:", "W:", or "I:".
89
910 -- Axel Beckert <abe@debian.org> Sun, 18 Nov 2018 16:53:41 +0100
1011
5252 if (scalar @p == 0) {
5353 @p = get_debs_from_path($path);
5454 if (scalar @p == 0) {
55 warn "Cannot find debug package for $name ($id)\n";
55 warn "W: Cannot find debug package for $name ($id)\n";
5656 }
5757 } elsif (scalar @p > 1) {
58 warn "Multiple packages for $name ($id): @p\n";
58 warn "W: Multiple packages for $name ($id): @p\n";
5959 }
6060 foreach my $p (@p) {
6161 $pkgs{$p} = 1;
103103 next;
104104 }
105105 if ($id eq '-') {
106 warn "No build-ID for $name\n";
106 warn "W: No build-ID for $name\n";
107107 next;
108108 } elsif ($id =~ /^([[:xdigit:]]{40})[@]/) {
109109 $id = $1;
116116 }
117117 $ids{$id} = [$path, $name];
118118 } else {
119 warn "Cannot parse eu-unstrip output: '$line'\n";
119 warn "W: Cannot parse eu-unstrip output: '$line'\n";
120120 }
121121 }
122122 return (%ids);
136136 } elsif ($line =~ /^\t(.+) \(0x[0-9a-f]+\)$/) {
137137 push @libs, $1;
138138 } else {
139 warn "Cannot parse ldd output: '$line'\n";
139 warn "W: Cannot parse ldd output: '$line'\n";
140140 }
141141 }
142142
229229 if ($line =~ /^(.*): /) {
230230 $pkgs{$1} = 1;
231231 } else {
232 warn "Cannot parse dpkg-query output: '$line'\n";
232 warn "W: Cannot parse dpkg-query output: '$line'\n";
233233 }
234234 }
235235 my @pkgs = sort keys %pkgs;
247247 my $output;
248248 $output = capturex([0, 1], qw(grep-aptavail --no-field-names --show-field Package --field Package --pattern -dbg --and --whole-pkg --field Source:Package --pattern), $src_pkg);
249249 if ($EXITVAL) {
250 warn "No dbg package for source '$src_pkg'\n";
250 warn "W: No dbg package for source '$src_pkg'\n";
251251 next;
252252 }
253253 my %src_dbg_pkgs = map { $_ => 1 } split(/\n/, $output);