Prefix all messages to STDERR with either "E:", "W:", or "I:"
Axel Beckert
4 years ago
5 | 5 |
+ Check if name given as parameter is an executable in $PATH if no
|
6 | 6 |
such file exists. Use File::Which for this and add a Recommends on
|
7 | 7 |
libfile-which-perl accordingly.
|
|
8 |
+ Prefix all messages to STDERR with either "E:", "W:", or "I:".
|
8 | 9 |
|
9 | 10 |
-- Axel Beckert <abe@debian.org> Sun, 18 Nov 2018 16:53:41 +0100
|
10 | 11 |
|
52 | 52 |
if (scalar @p == 0) {
|
53 | 53 |
@p = get_debs_from_path($path);
|
54 | 54 |
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";
|
56 | 56 |
}
|
57 | 57 |
} elsif (scalar @p > 1) {
|
58 | |
warn "Multiple packages for $name ($id): @p\n";
|
|
58 |
warn "W: Multiple packages for $name ($id): @p\n";
|
59 | 59 |
}
|
60 | 60 |
foreach my $p (@p) {
|
61 | 61 |
$pkgs{$p} = 1;
|
|
103 | 103 |
next;
|
104 | 104 |
}
|
105 | 105 |
if ($id eq '-') {
|
106 | |
warn "No build-ID for $name\n";
|
|
106 |
warn "W: No build-ID for $name\n";
|
107 | 107 |
next;
|
108 | 108 |
} elsif ($id =~ /^([[:xdigit:]]{40})[@]/) {
|
109 | 109 |
$id = $1;
|
|
116 | 116 |
}
|
117 | 117 |
$ids{$id} = [$path, $name];
|
118 | 118 |
} else {
|
119 | |
warn "Cannot parse eu-unstrip output: '$line'\n";
|
|
119 |
warn "W: Cannot parse eu-unstrip output: '$line'\n";
|
120 | 120 |
}
|
121 | 121 |
}
|
122 | 122 |
return (%ids);
|
|
136 | 136 |
} elsif ($line =~ /^\t(.+) \(0x[0-9a-f]+\)$/) {
|
137 | 137 |
push @libs, $1;
|
138 | 138 |
} else {
|
139 | |
warn "Cannot parse ldd output: '$line'\n";
|
|
139 |
warn "W: Cannot parse ldd output: '$line'\n";
|
140 | 140 |
}
|
141 | 141 |
}
|
142 | 142 |
|
|
229 | 229 |
if ($line =~ /^(.*): /) {
|
230 | 230 |
$pkgs{$1} = 1;
|
231 | 231 |
} else {
|
232 | |
warn "Cannot parse dpkg-query output: '$line'\n";
|
|
232 |
warn "W: Cannot parse dpkg-query output: '$line'\n";
|
233 | 233 |
}
|
234 | 234 |
}
|
235 | 235 |
my @pkgs = sort keys %pkgs;
|
|
247 | 247 |
my $output;
|
248 | 248 |
$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);
|
249 | 249 |
if ($EXITVAL) {
|
250 | |
warn "No dbg package for source '$src_pkg'\n";
|
|
250 |
warn "W: No dbg package for source '$src_pkg'\n";
|
251 | 251 |
next;
|
252 | 252 |
}
|
253 | 253 |
my %src_dbg_pkgs = map { $_ => 1 } split(/\n/, $output);
|