[Bug 282323] Mk/Uses/cargo.mk: The [patch.crates-io.xx] section causes build failure: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 25 Oct 2024 20:48:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282323

            Bug ID: 282323
           Summary: Mk/Uses/cargo.mk: The [patch.crates-io.xx] section
                    causes build failure: failed to resolve patches for
                    `https://github.com/rust-lang/crates.io-index`
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

Created attachment 254514
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=254514&action=edit
patch

I am attempting to update the port lang/pomsky with the attached patch.

The Cargo.toml file has this section:
[patch.crates-io.onig_sys]
git = "https://github.com/rust-onig/rust-onig"
revision = "fa90c0e97e90a056af89f183b23cd417b59ee6a2"

This section resulted in CARGO_CRATES having this line:
onig_sys@git+https://github.com/rust-onig/rust-onig\#fa90c0e97e90a056af89f183b23cd417b59ee6a2

However, the build fails:

> warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
> package:   /usr/ports/lang/pomsky/work/pomsky-0dc518f/pomsky-bin/Cargo.toml
> workspace: /usr/ports/lang/pomsky/work/pomsky-0dc518f/Cargo.toml
> error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
> 
> Caused by:
>   patch for `onig_sys` in `https://github.com/rust-lang/crates.io-index` failed to resolve
> 
> Caused by:
>   The patch location `https://github.com/rust-onig/rust-onig` does not appear to contain any packages matching the name `onig_sys`.
> *** Error code 101

-- 
You are receiving this mail because:
You are the assignee for the bug.