On Tue, 11 Nov 2025 at 16:38, Giovanni Santini
<[email protected]> wrote:
>
> Hello,
>
> On 2025-11-10 21:58, Tiago de Paula wrote:
> > That `+` sign is not allowed in `pkgver`. See
> > <https://wiki.archlinux.org/title/PKGBUILD#pkgver>:
> >
> >> It can contain letters, numbers, periods and underscores, but not a hyphen 
> >> (-). If the author of the software uses one, replace it with an underscore 
> >> (_).
>
> I tried to replace the pluses with underscore, but still getting the
> same error:
>
> ```
>
> (20:37) giovanni @ ~/Projects/AUR/wip/ampcode $ grep ^pkgver PKGBUILD
> pkgver="0.0.1762617680_gaa03ea"
> (20:37) giovanni @ ~/Projects/AUR/wip/ampcode $ cat .nvchecker.toml
> [ampcode]
> source = "npm"
> npm = "@sourcegraph/amp"
> from_pattern = '([0-9.]+)-([a-z0-9]+)'
> to_pattern = '\1_\2'
> (20:37) giovanni @ ~/Projects/AUR/wip/ampcode $ pkgctl version upgrade
> 📡 ampcode: query latest version
> ⌛ Upgrading: 1/1 [100%] ⠄⠀==> ERROR: Non-standard pkgver declaration
>
> ```
>
> Is it a `pkgctl` bug?
>
> --
> Giovanni Santini
>

I can't reproduce this issue locally. Testing your `.nvchecker.toml`
on the current `ampcode` from AUR, I get this instead:

```console
> pkgctl version upgrade
Failure
 x ampcode: failed to update checksums for version 0.0.1762891276_ge61ff2

Upgraded
 ! ampcode: upgraded from version 0.0.1756886778 to 0.0.1762891276_ge61ff2
```

And then changing the PKGBUILD to use the NPM tarball
(`source=("https://registry.npmjs.org/@sourcegraph/amp/-/amp-${pkgver/_/-}.tgz";)`)
does work for me:

```console
> pkgctl version upgrade
Upgraded
 ! ampcode: upgraded from version 0.0.1756886778 to 0.0.1762891276_ge61ff2
```

Reply via email to