On Monday, March 25 2024, Shriram Ravindranathan wrote: > Dear Mentors, > > I noticed from the past couple of days, uscan seems to be having trouble > finding files from the gitlab tags page. > > ``` > $ uscan > uscan warn: In debian/watch no matching files for watch line > https://gitlab.com/saalen/highlight/tags?sort=updated_desc > .*/archive/(\d\S+)/.*\.tar\.gz.* > ``` > > Checking the same pattern with grep shows that it does find a match > > ``` > $ curl -L "https://gitlab.com/saalen/highlight/tags?sort=updated_desc" | grep > -E ".*/archive/([0-9]\S+)/.*\.tar\.gz.*" > % Total % Received % Xferd Average Speed Time Time Time > Current > Dload Upload Total Spent Left Speed > 100 126 100 126 0 0 287 0 --:--:-- --:--:-- --:--:-- 287 > 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- > 0<div class="js-source-code-dropdown" data-css-class="" > data-download-artifacts="[]" > data-download-links="[{"text":"zip","path":"/saalen/highlight/-/archive/4.11/highlight-4.11.zip"},{"text":"tar.gz","path":"/saalen/highlight/-/archive/4.11/highlight-4.11.tar.gz"},{"text":"tar.bz2","path":"/saalen/highlight/-/archive/4.11/highlight-4.11.tar.bz2"},{"text":"tar","path":"/saalen/highlight/-/archive/4.11/highlight-4.11.tar"}]"></div> > 100 85448 100 85448 0 0 51822 0 0:00:01 0:00:01 --:--:-- 401k > ``` > > It seems like a few other packages are also having similar troubles with > uscan, for example lomiri <https://tracker.debian.org/pkg/lomiri> > > Is there a way to fix this?
I don't know if there's an "official" way to fix this, but the problem seems to be the fact the actual download link is embedded inside an element of the page, like this: <div class="js-source-code-dropdown" ... data-download-links="[{"text":"zip","path":"/saalen/highlight/-/archive/v4.11/highlight-v4.11.zip"},{"text":"tar.gz","path":"/saalen/highlight/-/archive/v4.11/highlight-v4.11.tar.gz"},...> uscan by default will try to parse the HTML of the page, which is not helpful in this case. You can try changing its search mode by specifying "searchmode=plain" as part of the "opts" variable. You may have to adjust your "filenamemange" regexp as well. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/
signature.asc
Description: PGP signature