Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955706 - net-wireless/soapysdr: several wrong uses of PDEPEND
Summary: net-wireless/soapysdr: several wrong uses of PDEPEND
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-09 23:22 UTC by Sam James
Modified: 2025-05-14 08:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-09 23:22:06 UTC
soapysdr has several USE flags which are PDEPEND-only. PDEPEND is exclusively for breaking circular dependencies, nothing else (e.g. optional runtime dependencies).

e.g. 0.8.1-r2 has:
```
IUSE="bladerf hackrf python rtlsdr plutosdr uhd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

RDEPEND="python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="python? ( dev-lang/swig:0 )"
PDEPEND="
        bladerf? ( net-wireless/soapybladerf )
        hackrf? ( net-wireless/soapyhackrf )
        rtlsdr? ( net-wireless/soapyrtlsdr )
        plutosdr? ( net-wireless/soapyplutosdr )
        
        uhd? ( net-wireless/soapyuhd )
"
```

None of those flags pass anything down to CMake.
Comment 1 Thomas Beierlein gentoo-dev 2025-05-14 06:12:59 UTC
(In reply to Sam James from comment #0)
> soapysdr has several USE flags which are PDEPEND-only. PDEPEND is
> exclusively for breaking circular dependencies,...

And that is exactly the reason why they are in PDEPEND.

While soapysdr provides the library and infrastructure used by applications the packages controlled by the USE-flags provides a modular hardware interface the library relies on (kind of plugins).

All PDEPEND packages use the infrastructure provided by soapysdr itself, so they have to be installed after soapysdr.

I would suggest keeping it as it is.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-14 06:22:50 UTC
(In reply to Thomas Beierlein from comment #1)
> (In reply to Sam James from comment #0)
> > soapysdr has several USE flags which are PDEPEND-only. PDEPEND is
> > exclusively for breaking circular dependencies,...
> 
> And that is exactly the reason why they are in PDEPEND.
> 

But there isn't any actual dependence of soapysdr on those? It'd be more fitting as a metapackage instead to control plugins (where you could have proper RDEPEND, not PDEPEND).

Having USE on a package which compiles something where the USE does nothing to the installed image is discouraged.
Comment 3 Thomas Beierlein gentoo-dev 2025-05-14 08:19:32 UTC
(In reply to Sam James from comment #2)
> But there isn't any actual dependence of soapysdr on those? 

No. But soapysdr without any of the the others would be useless (In that sense a ANY-OF is missing at least).

> It'd be more
> fitting as a metapackage instead to control plugins (where you could have
> proper RDEPEND, not PDEPEND).

You mean something like tree-sitter-meta or similar and move the USE-flags to the meta-package? 

Any problem I see is that we would need to change all packages depending on soapysdr (7 atm).

> Having USE on a package which compiles something where the USE does nothing
> to the installed image is discouraged.