[Apt-listbugs-commits] [apt-listbugs] 01/02: add AptListbugs::Severities configuration option

Serafeim Zanikolas sez at debian.org
Sat Sep 7 22:20:52 UTC 2013


On Sat, Sep 07, 2013 at 10:16:54PM +0200, Francesco Poli wrote:
> On Sat, 7 Sep 2013 18:50:53 +0100 Serafeim Zanikolas wrote:
> 
> > On Tue, Sep 03, 2013 at 08:28:43PM +0000, Francesco Poli wrote:
> > > commit e417708b602cca25be2ded8aeb797b8f5dc908de
> > > Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
> > > Date:   Mon Sep 2 23:54:00 2013 +0200
> > > 
> > >     add AptListbugs::Severities configuration option
> > [..]
> > >    def parse_options
> > > +    if /sev_list='(.*)'/ =~ `apt-config #{@apt_conf} shell sev_list AptListbugs::Severities`
> > > +      if $1 == "all"
> > > +        @severity = ["critical","grave","serious","important","normal","minor","wishlist"]
> > > +      else
> > > +        @severity = $1.split(',')
> > 
> > I would encourage you to do some kind of validation here, instead of blindly
> > assume that anything in this comma-separated list is a valid severity value.
> 
> There does not seem to be any validation for the -s option, either.

Well then I would also encourage you to add validation for -s too :)

A mistyped severity name will be silently ignored. It'd be useful to at least
print a warning so that eg. a user doesn't upgrade to RC buggy releases
unknowingly.

-- 
Every great idea is worthless without someone to do the work. --Neil Williams



More information about the Apt-listbugs-commits mailing list