Bug#517637: [devscripts] 03/06: uscan: @PACKAGE@ etc.

Osamu Aoki osamu at debian.org
Thu Nov 12 16:00:58 UTC 2015


Hi, (Better to record in BTS as follow up)

On Tue, Nov 10, 2015 at 04:55:05PM +0000, Mattia Rizzolo wrote:
> >     Fix #517637 auto-generalise the search regex
> but..
...
> > +	my $archive_ext = '(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)';
> 
> from https://wiki.debian.org/debian/watch#Common_mistakes I think it
> would be better to
> 
> $archive_ext = '\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))'
> 
> or, to take into account the other bug about ordering,
> 
> $archive_ext = '\.(?:(?:tar\.(?:xz|bz2|gz)|txz|tbz|tgz|zip))'
> 
> which is the exact reverse, if I typed correctly.
> 
> 
> Then, do you think you can do something similar to avoid hardcoding
>     opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/
> and
>     opts=dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//
> everywhere too?  (always coming from that page)

When creating huristic default rule, we need to be conservative.

I was tempted to use '(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz)'

This will address package migrating this set of most popular names.

Considering we are scanning full href string, searching short string is
dangerous to create false positive.

Besides, how many upstream uses tgz|tbz|txz ? I have not check  the real
stat but I doubt it to be less than 1%.

Osamu



More information about the devscripts-devel mailing list