.SH SYNOPSIS
\fBgrep-excuses\fR [\fIoptions\fR] [\fImaintainer\fR|\fIpackage\fR]
.SH DESCRIPTION
-\fBgrep-excuses\fR downloads the update_excuses.html file and greps it
+\fBgrep-excuses\fR downloads the autoremovals and update_excuses.html files
+and greps them
for the specified maintainer or package name. The \fBwget\fR package is
required for this script. If no name is given on the command line,
first the environment variable \fBDEBFULLNAME\fR is used if it is
.B \-\-version
Show version and copyright information.
.TP
+.B \-\-no\-autoremovals
+Investigate and show only testing propagation excuses, not autoremovals.
+.TP
.B \-\-debug
Print debugging output to stderr (including url(s) fetched).
.SH "CONFIGURATION VARIABLES"
# Needed for --wipnity option
open DEBUG, ">/dev/null" or die $!;
+my $do_autoremovals = 1;
my $term_size_broken;
my $url='http://ftp-master.debian.org/testing/update_excuses.html.gz';
+my $rmurl='https://udd.debian.org/cgi-bin/autoremovals.cgi';
+my $rmurl_yaml='https://udd.debian.org/cgi-bin/autoremovals.yaml.cgi';
+
# No longer use these - see bug#309802
my $cachedir = $ENV{'HOME'}."/.devscripts_cache/";
my $cachefile = $cachedir . basename($url);
must be the first option given
--wipnity, -w Check <http://release.debian.org/migration/>. A package
name must be given when using this option.
+ --no-autoremovals Do not investigate and report autoremovals
--help Show this help
--version Give version information
--debug Print debugging output to stderr
open DEBUG, ">&STDERR" or die $!;
shift; next;
}
+ if ($ARGV[0] eq '--no-autoremovals') { $do_autoremovals=0; shift; next; }
if ($ARGV[0] eq '--help') { usage(); exit 0; }
if ($ARGV[0] eq '--version') { print $version; exit 0; }
if ($ARGV[0] =~ /^--no-?conf$/) {
die "$progname: this program requires the wget package to be installed\n";
}
+sub grep_autoremovals () {
+ print DEBUG "Fetching $rmurl\n";
+
+ open REMOVALS, "wget -q -O - $rmurl |" or
+ die "$progname: wget $rmurl failed: $!\n";
+
+ my $wantmaint = 0;
+ my %reportpkgs;
+
+ while (<REMOVALS>) {
+ if (m%^https?:%) {
+ next;
+ }
+ if (m%^\S%) {
+ $wantmaint = m%^\Q$string\E\b%;
+ next;
+ }
+ if (m%^$%) {
+ $wantmaint = undef;
+ next;
+ }
+ if (defined $wantmaint && m%^\s+([0-9a-z][-.+0-9a-z]*):\s*(.*)%) {
+ next unless $wantmaint || $1 eq $string;
+ warn "$progname: package $1 repeated in $rmurl at line $.:\n$_"
+ if defined $reportpkgs{$1};
+ $reportpkgs{$1} = $2;
+ next;
+ }
+ warn "$progname: unprocessed line $. in $rmurl:\n$_";
+ }
+ $?=0; close REMOVALS or die "$progname: fetch $rmurl failed ($? $!)\n";
+
+ return unless %reportpkgs;
+
+ print DEBUG "Fetching $rmurl_yaml\n";
+
+ open REMOVALS, "wget -q -O - $rmurl_yaml |" or
+ die "$progname: wget $rmurl_yaml failed: $!\n";
+
+ my $reporting = 0;
+ while (<REMOVALS>) {
+ if (m%^([0-9a-z][-.+0-9a-z]*):$%) {
+ my $pkg = $1;
+ my $human = $reportpkgs{$pkg};
+ delete $reportpkgs{$pkg};
+ $reporting = !!defined $human;
+ if ($reporting) {
+ print"$pkg (AUTOREMOVAL)\n $human\n" or die $!;
+ }
+ next;
+ }
+ if (m%^[ \t]%) {
+ if ($reporting) {
+ print " ", $_ or die $!;
+ }
+ next;
+ }
+ if (m%^$% || m%^\#%) {
+ next;
+ }
+ warn "$progname: unprocessed line $. in $rmurl_yaml:\n$_";
+ }
+
+ $?=0; close REMOVALS or die "$progname: fetch $rmurl_yaml failed ($? $!)\n";
+
+ foreach my $pkg (keys %reportpkgs) {
+ print "$pkg (AUTOREMOVAL)\n $reportpkgs{$pkg}\n" or die $!;
+ }
+}
+
+grep_autoremovals() if $do_autoremovals;
+
print DEBUG "Fetching $url\n";
open EXCUSES, "wget -q -O - $url | zcat |" or