[oe] How to specify RDEPENDS properly?

Richard Purdie rpurdie at rpsys.net
Thu Feb 22 12:51:23 UTC 2007


On Thu, 2007-02-22 at 19:32 +0800, Rob Kramer wrote:
> I'm trying to build my custom image after updating OE (it worked several
> months back :). I've already converted several things to the new style, but
> I can't get my RDEPENDS right. There are about 4 problematic packages, but
> let's pick readline.
> 
> I want libreadline.so in my image, so I include readline as follows: 
> 
> export PACKAGE_INSTALL = "... readline ..."
> RDEPENDS = "${PACKAGE_INSTALL}"
> 
> That doesn't work though:
> 
> | Collected errors:
> | Cannot find package readline.
> | Check the spelling or perhaps run 'ipkg update'
[...]
> export PACKAGE_INSTALL = "... libreadline ..."
> RDEPENDS = "${PACKAGE_INSTALL}"
> 
> That doesn't work either:
> 
> BB>> build display-image
> SHELL: This command needs to parse bbfiles...
> NOTE: Using cache in '/bulk/home/rob/oe/dev/build-epia/tmp/cache/rob-epia'
> NOTE: Handling BitBake files: | (4243/4243) [100 %]
> NOTE: Parsing finished. 3315 cached, 1 parsed, 196 skipped, 731 masked.
> 
> SHELL: Building display-image
> ERROR: Nothing provides runtime dependency libreadline
> NOTE: no buildable providers for display-image
> 
> Neither does 'libreadline4'.
> 
> I looked at how all the other images/tasks do this, but it seems readline is
> not RDEPENDed anywhere...?
> 
> How should I do this, or where to RTFM, if explained there?

Paul's explanation is nearly correct although not quite.

There are two namespaces in OE, (build) DEPENDS and (runtime) RDEPENDS.
DEPENDS comes from the package names (PN), RDEPENDS comes from PACKAGES.
Anything you put in RDEPENDS should match something in PACKAGES.

The correct line is therefore:

export PACKAGE_INSTALL = "... libreadline ..."
RDEPENDS = "${PACKAGE_INSTALL}"

but as you point out, this didn't work. The reason is debian.bbclass 's
package renaming which changes libreadline_4.3-r3_i586.ipk into
libreadline4_4.3-r3_i586.ipk.

You therefore need libreadline4 in PACKAGE_INSTALL but readline in
RDEPENDS.

This highlights a nice bug since its not possible to easily add
debian.bbclass renamed packages directly to an image in PACKAGE_INSTALL.
People have hinted at there being some problem for a while but I only
now realise exactly what it is (nobody shown me a failure case until
now).

The reason most people don't hit this is they declare tasks eg:

PACKAGES = "task-myimage"

RDEPENDS_task-myimage = "readline"

in some task-myimage.bb and then use PACKAGE_INSTALL = "task-myimage".
There is magic behind the scenes which will convert readline into
libreadline4 when its written out to a package.

Armed with the above info, you should at least be able to work around
this. I'll give some thought to processing PACKAGE_INSTALL so we can
convert references in it into proper package names...

Cheers,

Richard






More information about the Openembedded-devel mailing list