r29499 - in /trunk/dh-make-perl: debian/changelog dh-make-perl lib/DhMakePerl.pm lib/DhMakePerl/Config.pm

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Fri Jan 9 18:22:19 UTC 2009


Author: gregoa
Date: Fri Jan  9 18:22:14 2009
New Revision: 29499

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29499
Log:
"--exclude": use default values from Dpkg::Source::Package instead of
maintaining our own list; if invoked without arguments use default values
again.

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

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=29499&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Fri Jan  9 18:22:14 2009
@@ -10,6 +10,9 @@
   * Add libtie-ixhash-perl to Build-Depends-Indep and Depends.
   * Create symlinks /usr/bin/cpan2deb -> dh-make-perl and
     /usr/share/man/man1/cpan2deb.1p.gz -> dh-make-perl.1p.gz.
+  * "--exclude": use default values from Dpkg::Source::Package instead of
+    maintaining our own list; if invoked without arguments use default values
+    again.
 
  -- Damyan Ivanov <dmn at debian.org>  Fri, 09 Jan 2009 11:38:50 +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=29499&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Fri Jan  9 18:22:14 2009
@@ -220,8 +220,8 @@
 
 This allows you to specify a PCRE to exclude some files from the search for
 docs and stuff like that. If no argument is given (but the switch is specified
-- not specifying the switch will include everything), it defaults to exclude
-CVS and .svn directories.
+- not specifying the switch will include everything), it defaults to
+dpkg-source's default values.
 
 =item B<--install>
 

Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=29499&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Fri Jan  9 18:22:14 2009
@@ -542,8 +542,7 @@
 
     find(
         sub {
-            my $pattern = qr( $self->cfg->exclude );
-            $File::Find::name !~ $pattern
+            $File::Find::name !~ $self->cfg->exclude
                 && /\.(pm|pod)$/
                 && $self->extract_desc($_);
         },
@@ -829,7 +828,7 @@
         sub {
             $changelog = substr( $File::Find::name, length($dir) )
                 if ( !defined($changelog) && /^change(s|log)$/i
-                and ( !$self->cfg->exclude or $File::Find::name !~ m($self->cfg->exclude) )
+                and ( !$self->cfg->exclude or $File::Find::name !~ $self->cfg->exclude )
                 );
         },
         $dir
@@ -844,8 +843,7 @@
         sub {
             push( @docs, substr( $File::Find::name, length($dir) ) )
                 if ( /^(README|TODO|BUGS|NEWS|ANNOUNCE)/i
-                and ( !$self->cfg->exclude or $File::Find::name !~ m($self->cfg->exclude) )
-                and ! /\.svn-base$/
+                and ( !$self->cfg->exclude or $File::Find::name !~ $self->cfg->exclude )
                 );
         },
         $dir
@@ -861,7 +859,7 @@
             push( @examples,
                 substr( $File::Find::name, length($dir) ) . '/*' )
                 if ( /^(examples?|eg|samples?)$/i
-                and ( !$self->cfg->exclude or $File::Find::name !~ m($self->cfg->exclude) )
+                and ( !$self->cfg->exclude or $File::Find::name !~ $self->cfg->exclude )
                 );
         },
         $dir
@@ -1105,7 +1103,7 @@
 sub check_for_xs {
     my ($self) = @_;
 
-    ( !$self->cfg->exclude or $File::Find::name !~ m($self->cfg->exclude) )
+    ( !$self->cfg->exclude or $File::Find::name !~ $self->cfg->exclude )
         && /\.(xs|c|cpp|cxx)$/i
         && do {
         $arch = 'any';

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=29499&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Config.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Config.pm Fri Jan  9 18:22:14 2009
@@ -4,6 +4,7 @@
 use warnings;
 
 use base 'Class::Accessor';
+use Dpkg::Source::Package;
 
 use constant options => (
     'arch=s',          'basepkgs=s',
@@ -50,7 +51,7 @@
     dh           => 7,
     dist         => '{sid,unstable}',
     email        => '',
-    exclude      => '(?:\/|^)(?:CVS|\.svn)\/',
+    exclude      => qr/$Dpkg::Source::Package::diff_ignore_default_regexp/,
     home_dir     => "$ENV{HOME}/.dh-make-perl",
     sources_list => '/etc/apt/sources.list',
     verbose      => 1,
@@ -95,7 +96,14 @@
     # Make CPAN happy, make the user happy: Be more tolerant!
     # Accept names to be specified with double-colon, dash or slash
     $opts{cpan} =~ s![/-]!::!g if $opts{cpan};
-    $opts{exclude} ||= '^$';
+
+    # "If no argument is given (but the switch is specified - not specifying
+    # the switch will include everything), it defaults to dpkg-source's 
+    # default values."
+    $opts{exclude} = '^$' if ! defined $opts{exclude};                 # switch not specified
+                                                                       # take everything
+    $opts{exclude} = $self->DEFAULTS->{'exclude'} if ! $opts{exclude}; # arguments not specified
+                                                                       # back to defaults
 
     while ( my ( $k, $v ) = each %opts ) {
         my $field = $k;




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