Bug 2161128 - The feature based dependency does not support format `[dependencies.foo]`
Summary: The feature based dependency does not support format `[dependencies.foo]`
Keywords:
Status: CLOSED DUPLICATE of bug 2152697
Alias: None
Product: Fedora
Classification: Fedora
Component: rust-packaging
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rust SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-16 03:43 UTC by Gris Ge
Modified: 2023-12-15 11:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-16 20:25:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gris Ge 2023-01-16 03:43:19 UTC
Description of problem:

According to https://bugzilla.redhat.com/show_bug.cgi?id=2159314

The feature based dependency cannot parse dependency in the format of

```
[dependencies.nispor]
version = "1.2.9"
optional = true


[features]
default = ["query_apply"]
query_apply = ["nispor"]
```

The error message indicate the rust packaging tools think the `nispor` is internal feature instead of external dependency.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Gris Ge 2023-01-16 06:32:08 UTC
The workaround I use is :


```

[features]
default = ["query_apply"]
query_apply = ["dep:nispor"]
```

Then manually define `Requires:  (crate(nispor/default) >= 1.2.9 with crate(nispor/default) < 2.0)`

Comment 2 Fabio Valentini 2023-01-16 20:25:32 UTC
The problem is not `[dependencies.foo]`, but `["dep:nispor"]` format. It's not yet supported by our tools, but I'm working on it.

*** This bug has been marked as a duplicate of bug 2152697 ***

Comment 3 Fabio Valentini 2023-02-22 17:50:02 UTC
This should be fixed when generating a spec file with rust2rpm >= 24 and building with cargo-rpm-macros >= 24, can you confirm that?

Comment 4 Gris Ge 2023-12-15 11:21:02 UTC
Sorry for the late response. Yes the `dep:<opt_dep_name` work as expected.

Thank you!


Note You need to log in before you can comment on or make changes to this bug.