Author: adam-guest
Date: 2008-02-20 21:25:59 +0000 (Wed, 20 Feb 2008)
New Revision: 1035
Modified:
trunk/README
trunk/debian/changelog
trunk/debian/control
trunk/scripts/debchange.pl
Log:
+ README: Update descriptions of tagpending and debchange
- Update descriptions of tagpending and debchange
* debchange:
- Modify --closes to use SOAP / Debbugs.pm
- Add hardy (heron) to the list of supported Ubuntu distributions
Modified: trunk/README
===================================================================
--- trunk/README 2008-02-20 19:53:57 UTC (rev 1034)
+++ trunk/README 2008-02-20 21:25:59 UTC (rev 1035)
@@ -53,7 +53,7 @@
- debc: List contents of current package. Do this after a successful
"debuild" to see if the package looks all right.
-- debchange (abbreviation dch) [liburi-perl, wget]:
+- debchange (abbreviation dch) [libsoap-lite-perl]:
Modifies debian/changelog and manages version numbers for you. It will
either increment the version number or add an entry for the current
version, depending upon the options given to it.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-02-20 19:53:57 UTC (rev 1034)
+++ trunk/debian/changelog 2008-02-20 21:25:59 UTC (rev 1035)
@@ -16,15 +16,18 @@
* uscan: Add support for repacking .zip archives, based on a patch
from Antonio Terceiro (Closes: #456587)
* Packaging changes:
- + README: Update description of tagpending
+ + README: Update descriptions of tagpending and debchange
+ debian/control:
- Add unzip(1) to Suggests for uscan's zip repacking
- - Update description of tagpending
+ - Update descriptions of tagpending and debchange
* debcommit: Use "git diff" instead of "git-diff" (Closes: #466158)
* dget: Correctly handle the processing of a file that we've already
retrieved (Closes: #445546)
* wnpp-alert: Note in the manpage that the results are source package
based
+ * debchange:
+ - Modify --closes to use SOAP / Debbugs.pm
+ - Add hardy (heron) to the list of supported Ubuntu distributions
[ Christoph Berg ]
* dget:
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2008-02-20 19:53:57 UTC (rev 1034)
+++ trunk/debian/control 2008-02-20 21:25:59 UTC (rev 1035)
@@ -50,8 +50,8 @@
gnupg]
- dd-list: given a list of packages, pretty-print it ordered by maintainer
- debc: display the contents of just-built .debs
- - debchange/dch: automagically add entries to debian/changelog files [wget,
- liburi-perl]
+ - debchange/dch: automagically add entries to debian/changelog files
+ [libsoap-lite-perl]
- debcheckout: checkout the development repository of a Debian package
- debclean: purge a Debian source tree [fakeroot]
- debcommit: commit changes to cvs, svn, svk, tla, bzr, git, or hg, basing
Modified: trunk/scripts/debchange.pl
===================================================================
--- trunk/scripts/debchange.pl 2008-02-20 19:53:57 UTC (rev 1034)
+++ trunk/scripts/debchange.pl 2008-02-20 21:25:59 UTC (rev 1035)
@@ -38,20 +38,9 @@
use File::Copy;
use File::Basename;
use Cwd;
+use lib '/usr/share/devscripts';
+use Devscripts::Debbugs;
-BEGIN {
- # Load the URI::Escape module safely
- eval { require URI::Escape; };
- if ($@) {
- my $progname = basename $0;
- if ($@ =~ /^Can\'t locate URI\/Escape\.pm/) {
- die "$progname: you must have the liburi-perl package installed\nto
use this script\n";
- }
- die "$progname: problem loading the URI::Escape module:\n [EMAIL
PROTECTED] you installed the liburi-perl package?\n";
- }
- import URI::Escape;
-}
-
# Predeclare functions
sub fatal($);
my $warnings = 0;
@@ -353,8 +342,8 @@
$warnings++ if not $opt_force_dist;
}
} elsif ($distributor eq 'Ubuntu') {
- unless ($opt_D =~
/^((warty|hoary|breezy|dapper|edgy|feisty|gutsy)(-updates|-security|-proposed)?|UNRELEASED)$/)
{
- warn "$progname warning: Recognised distributions
are:\n{warty,hoary,breezy,dapper,edgy,feisty,gutsy}{,-updates,-security,-proposed}
and UNRELEASED.\nUsing your request anyway.\n";
+ unless ($opt_D =~
/^((warty|hoary|breezy|dapper|edgy|feisty|gutsy|hardy)(-updates|-security|-proposed)?|UNRELEASED)$/)
{
+ warn "$progname warning: Recognised distributions
are:\n{warty,hoary,breezy,dapper,edgy,feisty,gutsy,hardy}{,-updates,-security,-proposed}
and UNRELEASED.\nUsing your request anyway.\n";
$warnings++ if not $opt_force_dist;
}
} else {
@@ -654,61 +643,43 @@
my @closes_text = ();
my $initial_release = 0;
if (@closes and $opt_query) { # and we have to query the BTS
- if (system('command -v wget >/dev/null 2>&1') >> 8 != 0) {
- warn "$progname warning: wget not installed, so cannot query the
bug-tracking system\n";
+ if (!Devscripts::Debbugs::have_soap) {
+ warn "$progname warning: libsoap-lite-perl not installed, so cannot
query the bug-tracking system\n";
$opt_query=0;
$warnings++;
# This will now go and execute the "if (@closes and ! $opt_query)" code
}
else
{
- my %bugs;
- my $lastbug;
-
- my $uripkg = uri_escape($PACKAGE);
- my $bugs = `wget -q -O -
'http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=$uripkg'`;
- if ($? >> 8 != 0) {
- warn "$progname warning: wget failed, so cannot query the
bug-tracking system\n";
+ my $bugs = Devscripts::Debbugs::select( "src:" . $PACKAGE );
+ my $statuses = Devscripts::Debbugs::status(
+ map {[bug => $_, indicatesource => 1]} @{$bugs} );
+ if (not defined $bugs) {
+ warn "$progname warning: Debbugs::status failed, so cannot query
the bug-tracking system\n";
$opt_query=0;
$warnings++;
# This will now go and execute the "if (@closes and ! $opt_query)"
code
}
-
- foreach (split /\n/, $bugs) {
- if (m%<a(?: class=\".*?\")?
href=\"(?:/cgi-bin/)?(?:bugreport.cgi\?bug=|/)([0-9]*).*?>\#\1: (.*?)</a>%i) {
- $bugs{$1} = [$2];
- $lastbug=$1;
- }
- elsif (defined $lastbug and
- m%<a(?: class=\".*?\")?
href=\"(?:/cgi-bin/)?pkgreport.cgi\?(?:[^\"]*?;)(?:pkg|package)=([a-z0-9\+\-\.]*)%i)
{
- push @{$bugs{$lastbug}}, $1
- if exists $bugs{$lastbug};
- $lastbug = undef;
- }
- }
-
foreach my $close (@closes) {
- if (exists $bugs{$close}) {
- my ($title,$pkg) = @{$bugs{$close}};
+ if (exists $statuses->{$close}) {
+ my $title = $statuses->{$close}->{subject};
+ my $pkg = $statuses->{$close}->{package};
$title =~ s/^($pkg|$PACKAGE): //;
- $title =~ s/"/\"/g;
- $title =~ s/</</g;
- $title =~ s/>/>/g;
- $title =~ s/&/&/g;
push @closes_text, "$title (Closes: \#$close)\n";
}
else { # not our package, or wnpp
- my $bug = `wget -q -O -
'http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$close'`;
- if ($? >> 8 != 0) {
+ my $bug = Devscripts::Debbugs::status(
+ [bug => $close, indicatesource => 1] );
+ if (not defined $bug) {
warn "$progname warning: unknown bug \#$close does not
belong to $PACKAGE,\n disabling closing changelog entry\n";
$warnings++;
push @closes_text, "Closes?? \#$close: UNKNOWN BUG IN WRONG
PACKAGE!!\n";
} else {
- my ($bugtitle) = ($bug =~ m%<TITLE>.*?\#$close - (.*?) -
[^-]*? report logs</TITLE>%);
+ my $bugtitle = $bug->{$close}->{subject};
$bugtitle ||= '';
- my ($bugpkg) = ($bug =~ m%<a(?: class=\".*?\")?
href=\"(?:/cgi-bin/)?pkgreport.cgi\?(?:[^\"]*?;)?(?:pkg|package)=([a-z0-9\+\-\.]*)%i);
+ my $bugpkg = $bug->{$close}->{package};
$bugpkg ||= '?';
- my ($bugsrcpkg) = ($bug =~ m%<a(?: class=\".*?\")?
href=\"(?:/cgi-bin/)?pkgreport.cgi\?src=([a-z0-9\+\-\.]*)%i);
+ my $bugsrcpkg = $bug->{$close}->{source};
$bugsrcpkg ||= '?';
if ($bugsrcpkg eq $PACKAGE) {
warn "$progname warning: bug \#$close appears to be
already archived,\n disabling closing changelog entry\n";
--
To unsubscribe, send mail to [EMAIL PROTECTED]