Hello, I could identify one reason, why I ran in that problem.
The name of the upstream source is doubled in the name of the downloaded file. the packages in question are: https://github.com/zxing/zxing https://github.com/FasterXML/jackson-core So I think I need a special part in the debian/watch file in these cases Kind regards Mechtilde Am 27.12.20 um 22:41 schrieb Matija Nalis: > On Sat, Dec 26, 2020 at 09:50:39AM +0100, Mechtilde Stehmann wrote: >> sometimes uscan is unable to download upstream sources and failed: >> This happens only when I have name and version number like >> jackson-core-2.12.0 > > Hmm, it looks to me like it would fail always? > >> What is wrong here? >> This is my watch file: >> >> version=4 >> opts=\ >> uversionmangle=s/-alpha/~alpha/;s/-Beta/~beta/;s/-rc/~rc/;s/PRE/~pre/,\ >> filenamemangle=s/.+\/v?(\d\S+)\.*/$1/ \ >> https://github.com/FasterXML/jackson-core/releases .*jackson-core- >> v?(\d\S+)\.tar\.gz > > There seems to be bug in your "filenamemangle" regex. > > And if that "filenamemangle" doesn't match, uscan(1) documentation > says the uscan will take alternate route, which is probably not what you > want. > So you must make sure this regex always matches and produces wanted filename. > > > You can test your filenamemangle with: > echo '$URLPART' | perl -pe '$REGEX' > > eg. > > % echo '/FasterXML/jackson-core/archive/jackson-core-2.12.0.tar.gz' | perl > -pe 's/.+\/v?(\d\S+)\.*/$1/' > /FasterXML/jackson-core/archive/jackson-core-2.12.0.tar.gz > > which returns wrong result -- you want it to return JUST filename without any > path > components (ie. just "jackson-core-2.12.0.tar.gz" in this case) > > Note that "\.*" is especially wrong in your regex, as it means > "0 or more of LITERAL dot (".") characters, like "" or "." or ".......", > but nothing else. If you wanted to match 0 or more of ANY characters > (as I guess was intention), it would be just ".*" (without "\"). > > For latest file released this looks like working regex: > echo /FasterXML/jackson-core/archive/jackson-core-2.12.0.tar.gz | perl -pe > 's/.+\/(jackson-core-\d\S+).*/$1/' > jackson-core-2.12.0.tar.gz > > So you can start with that and improve. Just make sure it always > matches all your possible URLs and produces (just a) correct > filename. > > Hope this helps, > Matija > -- Mechtilde Stehmann ## Apache OpenOffice ## Freie Office Suite für Linux, MacOSX, Windows und OS/2 ## Debian Developer ## PGP encryption welcome ## F0E3 7F3D C87A 4998 2899 39E7 F287 7BBA 141A AD7F
OpenPGP_signature
Description: OpenPGP digital signature