Hi, On Sat, Sep 12, 2015 at 03:03:15PM -0400, James McCoy wrote: > On Sat, Sep 12, 2015 at 04:03:38PM +0000, Osamu Aoki wrote: > > commit 585bed852f5f675d3bb36fe5d91b811e2d9a6eec > > Author: Osamu Aoki <[email protected]> > > Date: Sat Sep 5 01:39:52 2015 +0900 > > > > uscan: Fix version passed to uupdate > > […] > > diff --git a/scripts/uscan.pl b/scripts/uscan.pl > > index a401544..c966586 100755 > > --- a/scripts/uscan.pl > > +++ b/scripts/uscan.pl > > @@ -1517,7 +1517,9 @@ EOF > > to_string => \$mk_origtargz_out, > > wait_child => 1); > > chomp($mk_origtargz_out); > > - $path = $1 if $mk_origtargz_out =~ /Successfully .* (?:to|as) > > ([^,]+)\.$/; > > + $path = $1 if $mk_origtargz_out =~ /Successfully .* (?:to|as) > > ([^,]+)(?:,.*)?\.$/; > > + $newversion = $newversion . $options{'repacksuffix'} > > + if $mk_origtargz_out =~ /Successfully .* adding suffix\.$/; > > The repacked filename is captured into $path and that will have the > version. That's what I was trying to suggest to use before, but I > wasn't being very clear. > > > $path = $1 if $mk_origtargz_out =~ /Leaving (.*) where it is/; > > $target = basename($path); > > } > > These changes are fine, it just looked like more work than parsing the > version out of $path/$target.
I see. By adding (?:,.*)? as above, it can catch $path/$target right then we can extract suffix adjusted version. That is cleaner and may be more robust for future changes. Osamu _______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
