| Summary: | Building a recipe that inherits cpan-base creates an image runtime dependency on perl | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Barry G <mr.scada> | ||||
| Component: | oe-core other | Assignee: | Barry G <mr.scada> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | Medium+ | CC: | randy.macleod, ross.burton, tim.orling | ||||
| Version: | 5.0 | ||||||
| Target Milestone: | 5.1 M3 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Barry G
2024-07-24 15:06:34 UTC
The patch is a good start, Ross is going to comment on how to proceed. This isn't a oe-core recipe so since the changes are likely only to the recipe, we're going to reject the bug for now. You can't check a PACKAGECONFIG in a base class unless its a well known and defined PACKAGECONFIG, which 'perl' is not. The cpan class is designed for recipes that fetch perl modules from cpan, so that class depending on perl makes sense. I can't see why the postgresql recipe actually pulls that class in at all. Would you be able to test a build of postgresql with perl enabled, but change the cpan-base inherit to perl-version? I'd suggest removing cpan-base from: https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-dbs/postgresql/postgresql.inc#n40 And add a line where the inherit conditionally happens if the perl PACKAGECONFIG is set. And please send patches to the mailing list: https://git.openembedded.org/meta-openembedded/tree/meta-oe/README.md (In reply to Ross Burton from comment #2) > You can't check a PACKAGECONFIG in a base class unless its a well known and > defined PACKAGECONFIG, which 'perl' is not. Thanks for the explanation. I figured patch was sketchy. > The cpan class is designed for recipes that fetch perl modules from cpan, so > that class depending on perl makes sense. > > I can't see why the postgresql recipe actually pulls that class in at all. > Would you be able to test a build of postgresql with perl enabled, but > change the cpan-base inherit to perl-version? Swapping cpan-base to perl-version in the inherit leads to: Traceback (most recent call last): File "Var <PERLCONFIGTARGET>", line 1, in <module> bb.data_smart.ExpansionError: Failure expanding variable PERLCONFIGTARGET, expression was ${@is_target(d)} which triggered exception NameError: name 'is_target' is not defined The variable dependency chain for the failure is: PERLCONFIGTARGET Since they call that is_target function on https://github.com/openembedded/meta-openembedded/blob/scarthgap/meta-oe/recipes-dbs/postgresql/postgresql.inc#L126 Just for administrative housekeeping; I submitted a patch to meta-openembedded: https://github.com/openembedded/meta-openembedded/commit/f311f1f01c19924d8cced61fa915f1387f92455b Thanks! |