most Debian tools use the DEBEMAIL environment variable, and I don't
see the harm in adding support for that, but whatever..

On Sat, May 30, 2009 at 05:03:03AM +0000, Debian Bug Tracking System wrote:
> 
> This is an automatic notification regarding your Bug report
> which was filed against the watchupstream package:
> 
> #523055: watchupstream: --maintre default to $DEBEMAIL/$EMAIL
> 
> It has been closed by Bart Martens <ba...@debian.org>.
> 
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Bart Martens 
> <ba...@debian.org> by
> replying to this email.
> 
> 
> -- 
> 523055: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523055
> Debian Bug Tracking System
> Contact ow...@bugs.debian.org with problems

> Date: Sat, 30 May 2009 06:59:28 +0200
> From: Bart Martens <ba...@debian.org>
> Subject: watchupstream: --maintre default to $DEBEMAIL/$EMAIL
> To: 523055-d...@bugs.debian.org
> X-Mailer: Evolution 2.22.3.1 
> 
> Let's always write an argument for --maintre.
> 
> Examples:
> 
> watchupstream --maintre niebur
> watchupstream --maintre bartm
> 
> It is, in my opinion, too easy to write "niebur" and "bartm" to want a
> default for --maintre.
> 
> 
> 

> Date: Wed, 8 Apr 2009 00:23:12 -0700
> From: Ryan Niebur <ryanrya...@gmail.com>
> Subject: watchupstream: [PATCH] --maintre default to $DEBEMAIL/$EMAIL
> To: sub...@bugs.debian.org
> 
> Package: watchupstream
> Version: 0.5.1
> Severity: wishlist
> Tags: patch
> 
> It would be convenient if this option defaulted to the user's
> $DEBEMAIL variable. Attached are patches.
> 
> -- 
> _________________________
> Ryan Niebur
> ryanrya...@gmail.com

> --- ./watchupstream   2008-07-04 05:11:18.000000000 -0700
> +++ ./watchupstream.email     2009-04-08 00:04:47.000000000 -0700
> @@ -26,7 +26,7 @@
>  # read command line options
>  use Getopt::Long;
>  my $packre = '';
> -my $maintre = '';
> +my $maintre = undef;
>  my $installed = '';
>  my $all = '';
>  my $nocache = '';
> @@ -40,7 +40,7 @@
>  GetOptions
>  (
>       "packre=s"  => \$packre,
> -     "maintre=s"  => \$maintre,
> +     "maintre:s"  => \$maintre,
>       "installed" => \$installed,
>       "all" => \$all,
>       "nocache"  => \$nocache,
> @@ -55,6 +55,13 @@
>  $export = 1 if( $try );
>  $nocache = 1 if( $try );
>  $nocache = 1 if( $export );
> +if(defined($maintre) && length($maintre) == 0) {
> +    $maintre = $ENV{'DEBEMAIL'};
> +    $maintre ||= $ENV{'EMAIL'};
> +    if(! $maintre) {
> +        die("You must either pass an argument to --maintre or have DEBEMAIL 
> or EMAIL set in your environment");
> +    }
> +}
>  
>  # create user configuration directory
>  my $usrcfgdir = glob( "~/.watchupstream" );

> --- watchupstream.1   2009-04-07 23:03:37.000000000 -0700
> +++ watchupstream.1.email     2009-04-08 00:13:36.000000000 -0700
> @@ -56,6 +56,10 @@
>  Use the given regular expression
>  on the "Maintainer:" field
>  to select packages to be queried.
> +If a regular expression is not
> +specified, it will default to the
> +DEBEMAIL or EMAIL environment
> +variables.
>  .TP
>  .B \-\-include-uploaders
>  Match the regular expression given





-- 
_________________________
Ryan Niebur
ryanrya...@gmail.com

Attachment: signature.asc
Description: Digital signature

Reply via email to