All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: openembedded-devel@openembedded.org
Cc: Rob Kramer <robk@starhub.net.sg>
Subject: Re: How to specify RDEPENDS properly?
Date: Thu, 22 Feb 2007 12:51:23 +0000	[thread overview]
Message-ID: <1172148683.5837.60.camel@localhost.localdomain> (raw)
In-Reply-To: <erjv1k$sm8$1@sea.gmane.org>

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





      parent reply	other threads:[~2007-02-22 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 11:32 How to specify RDEPENDS properly? Rob Kramer
2007-02-22 12:14 ` Paul Sokolovsky
2007-02-22 12:24   ` Koen Kooi
2007-02-22 12:56   ` Rob Kramer
2007-02-22 12:51 ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172148683.5837.60.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=openembedded-devel@openembedded.org \
    --cc=robk@starhub.net.sg \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.