Package: watchupstream Version: 0.5.1 Severity: wishlist Tags: patch It would be quite useful if there were an option to make watchupstream search for packages where the user is in Uploaders instead of maintainers. Patches attached.
-- _________________________ Ryan Niebur [email protected]
--- /dev/fd/63 2009-04-07 22:23:03.513773739 -0700 +++ ./watchupstream.1 2009-04-07 22:22:10.000000000 -0700 @@ -57,6 +57,11 @@ on the "Maintainer:" field to select packages to be queried. .TP +.B \-\-include-uploaders +Match the regular expression given +to the maintre option on the +"Uploaders:" field as well. +.TP .B \-\-installed Select all packages that are .B installed
--- watchupstream 2008-07-04 05:11:18.000000000 -0700
+++ /usr/bin/watchupstream 2009-04-07 22:19:31.000000000 -0700
@@ -37,6 +37,7 @@
my $loadcpan = '';
my $loadsf = '';
my $debug = '';
+my $include_uploaders = '';
GetOptions
(
"packre=s" => \$packre,
@@ -51,6 +52,7 @@
"loadcpan" => \$loadcpan,
"loadsf" => \$loadsf,
"debug" => \$debug,
+ "include-uploaders" => \$include_uploaders,
) or die;
$export = 1 if( $try );
$nocache = 1 if( $try );
@@ -74,10 +76,12 @@
# tie hashes for debian repository information
my %version;
my %maintainer;
+my %uploaders;
my %difffile;
my %bin2src;
tie( %version, 'NDBM_File', "$usrcfgdir/version", O_RDWR|O_CREAT, 0644 ) or
die;
tie( %maintainer, 'NDBM_File', "$usrcfgdir/maintainer", O_RDWR|O_CREAT, 0644 )
or die;
+tie( %uploaders, 'NDBM_File', "$usrcfgdir/uploaders", O_RDWR|O_CREAT, 0644 )
or die;
tie( %difffile, 'NDBM_File', "$usrcfgdir/difffile", O_RDWR|O_CREAT, 0644 ) or
die;
tie( %bin2src, 'NDBM_File', "$usrcfgdir/bin2src", O_RDWR|O_CREAT, 0644 ) or
die;
@@ -121,6 +126,7 @@
{
$version{$field{'Package'}} = $field{'Version'};
$maintainer{$field{'Package'}} = $field{'Maintainer'};
+ $uploaders{$field{'Package'}} = $field{'Uploaders'}
if(defined($field{'Uploaders'}));
$difffile{$field{'Package'}} =
"$field{'Directory'}/$field{'diff.gz'}"
if( defined( $field{'diff.gz'} ) );
@@ -742,8 +748,8 @@
return 0 if( ! defined( $package ) );
return 0 if( $packre and $pkg !~ /$packre/i and $package !~ /$packre/i
);
- return 0 if( $maintre and ! defined( $maintainer{$package} ) );
- return 0 if( $maintre and $maintainer{$package} !~ /$maintre/i );
+ return 0 if( $maintre and (! defined( $maintainer{$package} ) && (!
$include_uploaders || ! defined($uploaders{$package}) ) ) );
+ return 0 if( $maintre and $maintainer{$package} !~ /$maintre/i && (!
$include_uploaders || ! defined($uploaders{$package}) || ! grep(/$maintre/,
split(", ", $uploaders{$package}))));
return 1;
}
@@ -838,6 +844,7 @@
untie %cpandir;
untie %version;
untie %maintainer;
+untie %uploaders;
untie %difffile;
untie %bin2src;
untie %statevar;
signature.asc
Description: Digital signature

