#283 "rust2rpm xh " failed
Opened a month ago by gordonwwang. Modified a month ago

The following error message is displayed when "rust2rpm xh -s "is executed:

[INFO ] Removing dependencies for target: 'cfg(not(any(target_os = "android", target_os = "fuchsia", target_os = "linux")))'
Subcommand failed with code 101: cargo metadata --quiet --format-version 1 --offline --no-deps --manifest-path /tmp/tmpcv_gt2m9/xh-0.22.2/Cargo.toml

But I unpack xh-0.22.2.crate and execute "cargo metadata --quiet --format-version 1 --offline --no-deps --manifest-path./Cargo.toml", The returned value is 0.

Is there a problem with rust2rpm here?


Hm, looks like the patch generated by rust2rpm-helper strip-foreign is causing the metadata to be invalid. Can you try unpacking the crate, running rust2rpm-helper strip-foreign on the Cargo.toml file, and check if the patching it does somehow makes the file invalid?

Rust2rpm-helper is not not strongly required for rust2rpm(Recommend), so I can dnf remove rust2rpm-helper.
Run rust2rpm xh, but an error still occurs:
WARNING: Falling back to broken built-in implementation for stripping non- applicable target-specific depdendencies: rust2rpm-helper is not installed • Dropping target-specific dependency on 'network-interface'. Subcommand failed with code 101: cargo metadata --quiet --format-version 1 --offline --no-deps --manifest-path /tmp/tmpsoyf6zg6/xh-0.22.2/ cargo.toml

When the rust2rpm-helper is removed, it seems that the problem still exists

Yes, the fallback patching code without rust2rpm-helper has more problems, not less. :)

I see the issue in xh. The Patching drops the network-interface crate, and the network-interface feature, but it doesn't remove the network-interface feature from the dependencies of the default feature.

As a workaround, you can use rust2rpm -p --no-patch-foreign and drop all references to network-interface manually.

Metadata Update from @decathorpe:
- Issue assigned to decathorpe
- Issue tagged with: bug

a month ago

Log in to comment on this ticket.

Metadata