r52464 - in /trunk/dh-make-perl: debian/changelog dh-make-perl lib/DhMakePerl.pm lib/DhMakePerl/Config.pm t/dists.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Wed Feb 10 17:54:23 UTC 2010


Author: dmn
Date: Wed Feb 10 17:54:16 2010
New Revision: 52464

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52464
Log:
add --network option (defaults to true)

tests pass --no-network if NO_NETWORK is defined in the environment

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/dh-make-perl
    trunk/dh-make-perl/lib/DhMakePerl.pm
    trunk/dh-make-perl/lib/DhMakePerl/Config.pm
    trunk/dh-make-perl/t/dists.t

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=52464&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Wed Feb 10 17:54:16 2010
@@ -10,6 +10,7 @@
   * add tests for --refresh
   * when a required dependency is not found, scan WNPP for a corresponding ITP
   * do not die when WNPP can't be checked for ITPs
+  * add --network option (defaults to true)
 
  -- Damyan Ivanov <dmn at debian.org>  Fri, 05 Feb 2010 09:05:25 +0200
 

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=52464&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Wed Feb 10 17:54:16 2010
@@ -274,6 +274,11 @@
 Installs the freshly built package. Specifying --install implies --build - The
 package will not be installed unless it was built (obviously ;-) )
 
+=item B<--network>
+
+Enables querying of Debian WNPP lists for ITP and similar bugs. Enabled by
+default, use C<--no-network> to disable.
+
 =item B<--notest>
 
 This option for not running the automatic testing of the module as part of

Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=52464&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Wed Feb 10 17:54:16 2010
@@ -1237,9 +1237,9 @@
 }
 
 sub get_itp {
-    return undef if $ENV{NO_NETWORK};
-
     my ( $self, $package ) = @_;
+
+    return undef unless $self->cfg->network;
 
     my $wnpp
         = "http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=wnpp;includesubj=ITP: $package";

Modified: trunk/dh-make-perl/lib/DhMakePerl/Config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Config.pm?rev=52464&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Config.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Config.pm Wed Feb 10 17:54:16 2010
@@ -26,6 +26,7 @@
     'dist=s',          'email|e=s',
     'exclude|i:s{,}',  'help',
     'home-dir=s',      'install!',
+    'network!',
     'nometa',          'notest',
     'only|o=s@',
     'packagename|p=s', 'pkg-perl!',
@@ -65,6 +66,7 @@
     email        => '',
     exclude      => qr/$Dpkg::Source::Package::diff_ignore_default_regexp/,
     home_dir     => "$ENV{HOME}/.dh-make-perl",
+    network      => 1,
     only         => ['control', 'copyright', 'docs', 'examples', 'rules'],
     verbose      => 1,
 };

Modified: trunk/dh-make-perl/t/dists.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/dists.t?rev=52464&op=diff
==============================================================================
--- trunk/dh-make-perl/t/dists.t (original)
+++ trunk/dh-make-perl/t/dists.t Wed Feb 10 17:54:16 2010
@@ -61,6 +61,7 @@
             "--home-dir", "$Bin/contents",
             "--apt-contents-dir", "$Bin/contents",
             "--data-dir", "$Bin/../share",
+            $ENV{NO_NETWORK} ? '--no-network' : (),
             "--sources-list",
             "$Bin/contents/sources.list", "--email", "joemaint\@test.local",
             $dist );
@@ -84,6 +85,7 @@
             "--home-dir", "$Bin/contents",
             "--apt-contents-dir", "$Bin/contents",
             "--data-dir", "$Bin/../share",
+            $ENV{NO_NETWORK} ? '--no-network' : (),
             "--sources-list",
             "$Bin/contents/sources.list", "--email", "joemaint\@test.local",
             "--refresh",




More information about the Pkg-perl-cvs-commits mailing list