~ubuntu-branches/ubuntu/wily/devscripts/wily

« back to all changes in this revision

Viewing changes to scripts/tagpending.pl

  • Committer: Package Import Robot
  • Author(s): James McCoy, Paul Wise, James McCoy, Dominique Dumont, Mattia Rizzolo
  • Date: 2015-07-27 23:12:23 UTC
  • mfrom: (10.10.23 sid)
  • Revision ID: package-import@ubuntu.com-20150727231223-iyqh301acuxy9lh5
Tags: 2.15.6
[ Paul Wise ]
* Adjust wording of common suffixes passed to repacksuffix

[ James McCoy ]
* debcheckout:
  + Handle Launchpad Git URLs.  Thanks to Colin Watson for the patch.
    (Closes: #788777)
  + Handle authenticated checkout when Vcs-Darcs is missing the root /darcs
    directory.
* checkbashisms:
  + Fix unescaped, literal curly brace in regex, causing FTBFS with Perl
    5.22.  Thanks to Roderich Schupp for the patch.  (Closes: #788707)
  + Improve detection of %q/%b to include when it is at the start of the
    string.  Thanks to Eero Vuojolahti.  (Closes: #793396)
* wnpp-check:
  + Use getopt to handle argument parsing.
  + Add --exact switch to match the exact package name instead of a
    substring.  Thanks to Balasankar C.  (Closes: #791918)
* Replace manual parsing of dpkg-buildpackage's output with the use of its
  -S switch or the Dpkg::Changelog::Parse Perl module.
  + Bump minimum required version of dpkg-dev to 1.17.0
* dget: Support arch-qualified package names.  “dget foo:i386” will download
  the foo binary package for Arch: i386.  “dget --all srcfoo:i386” will
  download all binary packages from the srcfoo source package that are
  either Arch: all or Arch: any/i386.  (Closes: #792917)
* uscan: Only check for presence of signing key when downloading a new
  upstream archive.  (Closes: #790047)

[ Dominique Dumont ]
* licensecheck:
  * extract © owner when © and owners are specified on 2 or more lines.
  * fix digia © and license extraction (Closes: #789074)
  * fix BSD-2-clause detection
  * parse assembly files with suffix .S
  * warn if scanned file is not a text file (Closes: #791756)

[ Mattia Rizzolo ]
* uscan: Suggest the correct syntax in the manpage for the dversionmangle
  option, escaping a '+'. Thanks to Martin Erik Werner for reporting.
  (Closes: #789389)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
use warnings;
29
29
use Getopt::Long qw(:config gnu_getopt);
30
30
use File::Basename;
 
31
use Dpkg::Changelog::Parse qw(changelog_parse);
31
32
use Devscripts::Debbugs;
32
33
 
33
34
sub bugs_info;
35
36
my $progname = basename($0);
36
37
 
37
38
my ($opt_help, $opt_version, $opt_verbose, $opt_noact, $opt_silent);
38
 
my ($opt_online, $opt_confirm, $opt_to, $opt_wnpp, $opt_comments);
 
39
my ($opt_online, $opt_confirm, %opt_to, $opt_wnpp, $opt_comments);
39
40
my $opt_interactive;
40
41
 
41
42
# Default options
45
46
$opt_noact = 0;
46
47
$opt_confirm = 0;
47
48
$opt_wnpp = 0;
48
 
$opt_to = '';
 
49
%opt_to = ();
49
50
$opt_comments = 1;
50
51
$opt_interactive = 0;
51
52
 
57
58
           "silent|s" => \$opt_silent,
58
59
           "force|f" => sub { $opt_online = 0; },
59
60
           "confirm|c" => \$opt_confirm,
60
 
           "to|t=s" => \$opt_to,
 
61
           "to|t=s" => sub { $opt_to{'-v'} = $_[1] },
61
62
           "wnpp|w" => \$opt_wnpp,
62
63
           "interactive|i" => \$opt_interactive,
63
64
           )
64
65
    or die "Usage: $progname [options]\nRun $progname --help for more details\n";
65
66
 
66
 
$opt_to = "-v$opt_to" if $opt_to;
67
 
 
68
67
if ($opt_help) {
69
68
    help(); exit 0;
70
69
} elsif ($opt_version) {
150
149
 
151
150
=cut
152
151
 
153
 
my $source;
154
 
my @closes;
155
 
my $in_changes=0;
156
 
my $changes='';
157
 
my $header='';
158
 
 
159
 
foreach my $file ("debian/changelog") {
160
 
    if (! -f $file) {
161
 
        die "$progname error: $file does not exist!\n";
162
 
    }
163
 
}
164
 
 
165
 
open PARSED, "dpkg-parsechangelog $opt_to |";
166
 
 
167
 
while (<PARSED>) {
168
 
    if (/^Source: (.*)/) {
169
 
        $source = $1;
170
 
    } elsif (/^Closes: (.*)$/) {
171
 
        @closes = split ' ', $1;
172
 
    } elsif (/^Changes: /) {
173
 
        $in_changes = 1;
174
 
    } elsif ($in_changes) {
175
 
        if ($header) {
176
 
            next unless /^ {3}[^[]/;
177
 
            $changes .= "\n" if $changes;
178
 
            $changes .= $_;
179
 
        } else {
180
 
            $header = $_;
181
 
        }
182
 
    }
183
 
}
184
 
 
185
 
close PARSED;
 
152
if (! -f 'debian/changelog') {
 
153
  die "$progname error: debian/changelog does not exist!\n";
 
154
}
 
155
 
 
156
my $changelog = changelog_parse(%opt_to);
 
157
my $source = $changelog->{Source};
 
158
my @closes = split ' ', $changelog->{Closes};
 
159
my @lines = split /\n/, $changelog->{Changes};
 
160
my $header = $lines[1];
 
161
my $changes = join "\n", grep /^ {3}[^[]/, @lines;
186
162
 
187
163
# Add a fake entry to the end of the recorded changes
188
164
# This makes the parsing of the changes simpler