~ubuntu-branches/debian/stretch/gcc-6-doc/stretch

« back to all changes in this revision

Viewing changes to debian/check_gcc_patches

  • Committer: Package Import Robot
  • Author(s): Guo Yixuan (郭溢譞)
  • Date: 2016-05-06 21:45:33 UTC
  • Revision ID: package-import@ubuntu.com-20160506214533-1ro717riyxkhd4kn
Tags: 6.1.0-1
* New upstream branch. (Closes: #822667)
* Synced patches with gcc-6, 6.1.1-1.
* Use https URIs for Vcs-*.
* Bumped standards version to 3.9.8, no changes needed.
* Update debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
# This is a helper to inspect gcc-x.y package's patches,
 
3
# looking for those applicable to gcc-x.y-doc.
 
4
 
5
# Usage:
 
6
# $ cd gcc-x.y/debian/patches
 
7
# $ perl $PATH_TO_ME/check_gcc_patches *.diff
 
8
use strict;
 
9
use warnings;
 
10
 
 
11
my $interest =
 
12
    qr{ 
 
13
        \.7$
 
14
        | \.texi$
 
15
        | texi2pod\.pl$
 
16
        | (xgnatugn.adb|ug_words)$
 
17
    }x;
 
18
 
 
19
my %inspect = ();
 
20
for my $patch (@ARGV) {
 
21
    print "Parsing $patch\n";
 
22
    open my $fh, "-|", qw(diffstat -l), $patch;
 
23
    while (<$fh>) {
 
24
        chomp;
 
25
        if (m/$interest/) {
 
26
            print "Match: $_\n";
 
27
            $inspect{$patch} = 1;
 
28
        }
 
29
    }
 
30
}
 
31
 
 
32
print "\n";
 
33
print "# Interesting patches:\n";
 
34
for my $patch (sort keys %inspect) {
 
35
    print "# grepping for $patch in rules.patch\n";
 
36
    my $base = $patch;
 
37
    $base =~ s/\.diff//;
 
38
    system "grep", "-n", "-B", "5", "$base", "../rules.patch";
 
39
    print "\n";
 
40
}
 
41
 
 
42
print "# you can add notes with this template\n";
 
43
for my $patch (sort keys %inspect) {
 
44
    print "# $patch\n";
 
45
}