Bug 6839 - Handle dev package with no main package more gracefully
Summary: Handle dev package with no main package more gracefully
Status: IN PROGRESS DESIGN
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium enhancement
Target Milestone: 6.1
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-14 15:32 UTC by Paul Eggleton
Modified: 2026-05-28 13:16 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2014-10-14 15:32:01 UTC
At the moment if your recipe produces no main (${PN}) package because it ends up empty then because of the RDEPENDS_${PN}-dev dependency on the ${PN} package, the ${PN}-dev package is unusable (and ${PN}-staticdev as well which depends upon the ${PN}-dev) because the dependency can never be satisfied. This situation can happen if your recipe only produces a static library for example.

Perhaps we could change the RDEPENDS to an RRECOMMENDS to avoid this?
Comment 1 Yoann Congal 2023-01-26 16:17:18 UTC
Richard's idea: Let's split the bug to make it more easy to solve in steps.
First step : add a QA check for this case : a -dev package depending on a non-existent main package.
Comment 2 Fawzi KHABER 2023-01-30 15:22:48 UTC
I would happily work on this one. Is this issue solved by the commit ddbd90a37c7e9089aaeccb42dd008cf47594099b ?
Comment 3 Randy MacLeod 2023-01-30 15:29:38 UTC
Add Richard. Please reply to the previous comment/question.
Comment 4 Randy MacLeod 2023-02-02 16:03:18 UTC
ping.
Comment 5 Yoann Congal 2023-02-24 15:03:35 UTC
Sent a RFC patch about this bug :
https://lists.openembedded.org/g/openembedded-core/topic/rfc_patch_0_2_handling_of/97195657
Comment 6 Richard Purdie 2023-02-25 10:26:13 UTC
I put some information about this into an oe-arch email: https://lists.openembedded.org/g/openembedded-architecture/message/1701
Comment 7 Yoann Congal 2023-09-16 12:45:47 UTC
On #8222:
Comment 7 Richard Purdie 2023-09-14 15:24:57 UTC
> I was asked about the status of this. I don't think there were objections to what I proposed in the email so I'd suggest we proceed in that direction.

Since #8222 looks like a more narrow case than this bug. I'll work on this one and #8222 may be fixed in the process (?)

The plan proposed by Richard is:
a) Add warnings for dependencies (RDEPENDS or RRECOMMENDS) on packages
which don't get created for some reason (either not in PACKAGES or not
ALLOW_EMPTY). We should be able to properly check this using
packagedata which never used to exist as it does now when these bugs
were first created! We can leave the warnings disabled at first until
we clean things up for core and our key layers

b) Work through those warnings to work out if we can silence them at
source. I think the dependency creation code for -dbg and -dev packages
will need to be taught to check if a target dependency exists to fix
the bulk of them.

c) Explore whether we should drop PN from PACKAGES in some of the above
cases.

d) Explore whether we can replace the current generic RRECOMMENDS from
PN-dev -> PN with something autogenerated based on the presence of
shared libs

e) For a long time I've wondered if we should split the -dbg packages
from one per recipe to one per package with binaries in it. This would
solve some of the problems that we'll likely encounter in b) but might
Comment 8 Yoann Congal 2023-09-28 21:59:07 UTC
Patch v1 sent for part a):
[PATCH 0/2] Empty packages and bogus dependencies (Part 1)
https://lists.openembedded.org/g/openembedded-core/message/188381
[PATCH 1/2] insane: Add QA check for RRECOMMENDS on non-existent packages
https://lists.openembedded.org/g/openembedded-core/message/188382
[PATCH 2/2] meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workarounds
https://lists.openembedded.org/g/openembedded-core/message/188383
Comment 9 Yoann Congal 2024-07-14 07:56:42 UTC
Example of a -dev only recipe in meta-oe https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/opencl/opencl-clhpp_git.bb#n22
with a workaround :
  # Headers only so PN is empty
  RDEPENDS:${PN}-dev = ""
Comment 10 Yoann Congal 2024-11-07 11:01:27 UTC
(Picking this subject up again)

(In reply to Yoann Congal from comment #8)
> Patch v1 sent for part a):
> [PATCH 0/2] Empty packages and bogus dependencies (Part 1)
> https://lists.openembedded.org/g/openembedded-core/message/188381
> [PATCH 1/2] insane: Add QA check for RRECOMMENDS on non-existent packages
> https://lists.openembedded.org/g/openembedded-core/message/188382
> [PATCH 2/2] meta/recipes: Remove empty ${PN}/DEV_PKG_DEPENDENCY workarounds
> https://lists.openembedded.org/g/openembedded-core/message/188383

Those v1 patches were not merged: See RP's review: https://lists.openembedded.org/g/openembedded-core/topic/101647340#msg190796
Comment 11 Yoann Congal 2025-04-29 14:41:57 UTC
Bulk move to 5.3
Comment 12 Yoann Congal 2025-11-06 10:57:03 UTC
Bulk move to 6.0 M1
Comment 13 Yoann Congal 2026-04-03 09:25:41 UTC
(Unassigning myself since a do not realistically have the time to work on this)
Comment 14 Randy MacLeod 2026-05-28 13:16:30 UTC
Bulk move of 6.0 Medium bugs to 6.1.