On Sun, Mar 21, 2021 at 08:34:58AM +0000, Gordon Ball wrote: > I started a branch for lintian-brush here: > https://salsa.debian.org/chronitis/lintian-brush/-/tree/github-archive-url > > (using a nonexistant lintian tag, so having a real one would definitely > be a first step). > > However, it turned out to be a bit more complex than I first thought (or > hoped): > > * Lots of unrelated test cases get broken (since it rewrites their watch > files) > * Lots of different ways of spelling the match pattern - amongst my > there were at least three (and subvariants of each) > > - .*/archive/v([0-9.]+) # now matches nothing > - .*/archive/(.+) # now matches refs/tags/x.y.z > - .*/archive/@ANY_VERSION@ # now matches nothing > > and the discussion on IRC suggested other cases too (adding a wildcard > for the new /refs/tags/ part, just matching @any_vers...@.tar.gz, etc. > * Unpreservable formatting in several of the test cases I was using > (continuation lines in comments?) > * What new pattern to actually write? The initial idea was just to > literally replace /archive/ with /archive/refs/tags/, which _should_ > meet the idea of being conservative about what to fix (but might still > collide with hand-written fixes for this issue like ./archive/.*/v... > > I _think_ a good indicator for lintian (and a fixer) would be if the > matching expression contains "archive" followed by no wildcard pattern > before the capturing group for the version. Thanks! I've merged your branch with some additional changes:
* reformatted the watch files in the examples to use a format that debian/watch can preserve * changed the logic to follow your last suggestion Ideally the other ways of formatting debian/watch would be handled too, but that's something that is a work in progress and needs to be fixed in debmutate.watch. Jelmer -- Jelmer Vernooij <jel...@jelmer.uk> PGP Key: https://www.jelmer.uk/D729A457.asc
signature.asc
Description: PGP signature