[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help needed for fixing calceph package




On 06/05/26 6:48 pm, Attila Kovacs wrote:
> Hi Thorsten and debian-astro,
> 
> 
> The calceph package had some issues with installing fortran .mod files 
> (see Debian bug #1133805).
> 
> I have fixed issue that on salsa:
> 
>    https://salsa.debian.org/debian-astro-team/calceph
> 
> However, I'm having other issues with the new watch file (version 5).
> 
> `uscan -dd` correctly identifies the latest version and downloads it. 
> However,
> 
> $ uscan --download-current-version
> 
> fails, as does
> 
> $ uscan --download-version 4.0.5
> 
> However,
> 
> $ uscan --download-version 4_0_5
> 
> works (i.e. using the upstream versioning with underscores instead of 
> dots separating the components.
> 
> 
> Here is the redacted output from:
> 
> $ uscan --versbose ---download-current-version
> 
> ```
> 
> uscan info: Scan watch files in .
> uscan info: Check debian/watch and debian/changelog in .
> uscan info: package="calceph" version="4.0.5-4" (as seen in 
> debian/changelog)
> uscan info: package="calceph" version="4.0.5" (no epoch/revision)
> uscan info: ./debian/changelog sets package="calceph" version="4.0.5"
> uscan info: Process watch file at: debian/watch
>      package = calceph
>      version = 4.0.5
>      pkg_dir = .
> uscan info: Parsing filenamemangle: s:(.+=)(.+):$2.tar.gz:
> uscan info: Parsing mode: gitlab
> uscan info: Parsing pgpmode: none
> uscan info: Parsing uversionmangle: s:(\d)_:$1\.:g
> uscan info: Parsing versiontype: (?:[-_]?[Vv]?(\d[\-+\.:\~\da-zA-Z]*))
> uscan info: Last orig.tar.* tarball version (from debian/changelog): 4.0.5
> uscan info: Download the --download-current-version specified version: 4.0.5
> uscan info: Searching versions of 
> https://gitlab.obspm.fr/imcce_calceph/calceph
> uscan info: Gitlab project_id is 2453
> uscan info: Found the following matching files on the web page (newest 
> first):
>   https://gitlab.obspm.fr/api/v4/projects/2453/repository/archive.tar.gz?sha=calceph_4_0_5 
> (4.0.5) index=4.0.5-1
> 
> [...]
> 
> uscan warn: In debian/watch no matching files for version 4.0.5 in watch 
> line
> uscan info: Scan finished
> 
> ```
> 
> 
> I.e., it finds the archive 
> (` https://gitlab.obspm.fr/api/v4/projects/2453/repository/archive.tar.gz?sha=calceph_4_0_5`), 
> demangles the version to (4.0.5), with index 4.0.5-1, but then fails to 
> match this to the debian version 4.0.5.
> 
> The watch file is:
> 
> ```
> 
> Version: 5
> Template: GitLab
> Dist: https://gitlab.obspm.fr/imcce_calceph/calceph
> Matching-Pattern: calceph_(.+)
> Filename-Mangle: s:(.+=)(.+):$2.tar.gz:
> Uversion-Mangle: s:(\d)_:$1\.:g
> 
> ```
> 
> 
> Please help getting the watch file right.

If I run with the current version 4 d/watch with the uscan `--debug` option, I see this in the output:

$ uscan --verbose --download-current-version --debug
...
uscan info: File debian/watch converted into << ==EOF==
Version: 5

Source: https://gitlab.obspm.fr/api/v4/projects/imcce_calceph%2Fcalceph/repository/tags
Matching-Pattern: https://gitlab.obspm.fr/imcce_calceph/calceph/.*/calceph-calceph_?(\d[_\d]*).tar.gz
Pagemangle: s!"name":"calceph_?(\d[_\d]*)"!<a href="https://gitlab.obspm.fr/imcce_calceph/calceph/-/archive/calceph_$1/calceph-calceph_$1.tar.gz";>!g
Uversionmangle: s:(\d)_:$1\.:g

==EOF==

If you just use this, it works fine.

Regarding:

$ uscan --download-version 4.0.5

Is wrong, as there is no 4.0.5 version upstream, it is 4_0_5. That doesn't work on your current v4 d/watch either.

Lastly:

I am not super sure about the --download-current-version failing with the d/watch you pasted above, and did not dig
much into the code or the manpage. If you are unable to figure out, then this could potentially be a bug in uscan
and you should file a bug report against devscripts.

For now, your problem should be fixed. HTH.

Thanks,
Nilesh


Reply to: