Bug 13618 - RRECOMMENDS ignored as soft dependency
Summary: RRECOMMENDS ignored as soft dependency
Status: RESOLVED NOTABUG
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-11-08 23:44 UTC by Jonathan Richardson
Modified: 2019-11-14 18:43 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
recipe (734 bytes, application/octet-stream)
2019-11-08 23:44 UTC, Jonathan Richardson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Richardson 2019-11-08 23:44:00 UTC
Created attachment 4585 [details]
recipe

I have a recipe that installs a bash script /etc/init.d/rdma-ndd. In warrior there was a QA error because there was no dependency on bash. I added RRECOMMENDS_${PN} += "bash" and it was fine. In zeus, it's not fine again even though NO_RECOMMENDATIONS="". I don't think this should be reported as a QA error. The RRECOMMENDS should be sufficient. Recipe attached.

ERROR: mc:stingray:infiniband-diags-1.6.6-r0 do_package_qa: QA Issue: /etc/init.d/rdma-ndd contained in package infiniband-diags requires /bin/bash, but no providers found in RDEPENDS_infiniband-diags? [file-rdeps]
ERROR: mc:stingray:infiniband-diags-1.6.6-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: Logfile of failure stored in: /home/jon/work/yocto/nxs-next-new2/poky/build/tmp/work/aarch64-poky-linux/infiniband-diags/1.6.6-r0/temp/log.do_package_qa.118042
ERROR: Task (mc:stingray:/home/jon/work/yocto/nxs-next-new2/poky/build/../meta-brcm/meta-datacenter/recipes-ofed/infiniband-diags/infiniband-diags_1.6.6.bb:do_package_qa) failed with exit code '1'


From bitbake -e:
NO_RECOMMENDATIONS=""
Comment 1 Richard Purdie 2019-11-14 15:04:29 UTC
I tried to reproduce this but I can't with the recipe provided as the patches are missing and I didn't try and figure out if I could find the other dependencies somewhere.

"bitbake infiniband-diags -e | grep RRECOMMENDS" does show the bash dependency being present.

That said I just realised that the QA check is specifically checking for RDEPENDS, not RRECOMMENDS. This does make sense since you'd normally want installed scripts to work!

I'd suggest you turn off that QA warning if you really don't care, something like:

INSANE_SKIP_${PN} = "file-rdeps"

This probably shouldn't be in the recipe but your distro config with a pn override so something like:

INSANE_SKIP_${PN}_pn-infiniband-diags = "file-rdeps"
Comment 2 Randy MacLeod 2019-11-14 15:32:13 UTC
See Richard's comment.
Comment 3 Jonathan Richardson 2019-11-14 18:43:28 UTC
I made it an RRECOMMENDS because I'm not using the script and didn't care about it. Since it worked in warrior I thought RRECOMMENDS was broken. Maybe it just wasn't being reported properly. So essentially if you install anything in the image you have no choice but install all dependencies also.

Sounds like it should be optional from the docs:

RRECOMMENDS
"The package being built does not depend on this list of packages in order to successfully build, but rather uses them for extended usability."