Skip to contentSkip to conversation

How to specify RDEPENDS properly?

DISCUSSION Rob Kramer 4 participants 5 messages Feb 22, 2007

lore
Share & tools
lore

Rob Kramer

author
#0 lore raw

Hi all,

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'

There's the following packages in deploy/ipk:

-rw-rw-r-- 1 rob users 16238 2007-02-20 13:59 libreadline-dbg_4.3-r3_i586.ipk
-rw-rw-r-- 1 rob users 123602 2007-02-20 13:59 libreadline-dev_4.3-r3_i586.ipk
-rw-rw-r-- 1 rob users 79874 2007-02-20 13:59 libreadline-doc_4.3-r3_i586.ipk
-rw-rw-r-- 1 rob users 91626 2007-02-20 13:59 libreadline4_4.3-r3_i586.ipk

I don't really understand when to use the package name (readline), and when to use the ipk name (libreadline[4]). Several months back I had to RDEPEND on libreadline, so try that again:

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?

Cheers!

Rob

#1 lore raw

Hello Rob,

Quoted 6 lines · you

Hi all,

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.

[]

Quoted 3 lines

I don't really understand when to use the package name (readline), and when to use the ipk name (libreadline[4]). Several months back I had to RDEPEND on libreadline, so try that again:

First thing to understand is that OE deals with 2 distinct
namespaces: one is for recipes, another is for packages. Each recipes may build one or more packages. Names of recipes and packages are connected, but not the same. Well, it's fair to say that recipe's name is usually appears as substring in package name, though bitbake really can build package named arbitrarily from any recipe.

So, what you specify in DEPENDS in recipe name. What you specify in
RDEPENDS and other R* friends in package name.

Quoted 4 lines

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

That doesn't work either:

BB>>> build display-image

Quoted 11 lines

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'.

There's no magic, let's see together: explode
libreadline4_4.3-r3_i586.ipk you have (it's essentiall .deb; if in doubt, use ar followed by tar -z). Look for DEBIAN/control file:
----
Provides: libreadline4
----
that's in addition to implicit provision of package name (which matches with explicit one here).

So, libreadline4 must work.

General hint: if you have any weird problems with packaging images,
first dumb thing you can try is to remove Packages* files and retry.

That's because ipkg and ipkg-utils have bugs tracking actual state
of package. For example, each time you do "bitbake -c rebuild", and then create image with that package(s), you *must* kill Packages*.

Quoted 8 lines

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?

Cheers!

Rob

Signature · 2 lines
Best regards,
 Paul                            mailto:[email protected]
#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:

Quoted 54 lines

Hello Rob,

Quoted 6 lines · you

Hi all,

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.

[]

Quoted 3 lines

I don't really understand when to use the package name (readline), and when to use the ipk name (libreadline[4]). Several months back I had to RDEPEND on libreadline, so try that again:

First thing to understand is that OE deals with 2 distinct
namespaces: one is for recipes, another is for packages. Each recipes may build one or more packages. Names of recipes and packages are connected, but not the same. Well, it's fair to say that recipe's name is usually appears as substring in package name, though bitbake really can build package named arbitrarily from any recipe.

So, what you specify in DEPENDS in recipe name. What you specify in
RDEPENDS and other R* friends in package name.

Quoted 4 lines

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

That doesn't work either:

BB>>> build display-image

Quoted 11 lines

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'.

There's no magic, let's see together: explode
libreadline4_4.3-r3_i586.ipk you have (it's essentiall .deb; if in doubt, use ar followed by tar -z). Look for DEBIAN/control file:
----
Provides: libreadline4
----
that's in addition to implicit provision of package name (which matches with explicit one here).

Quoted 1 line

So, libreadline4 must work.

Right, but you don't want RDEPENDS = "libreadline4" since not everyone is using debian style shlib renaming.

regards,

Koen

PS: Paul, sending 1 reply to the list is enough, 2 is overkill -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFF3YuXMkyGM64RGpERAiM0AJ9PBu1IGezIuOxiAr7vjZxUC0GwPwCfZvWL A20OVsfkXKvXHv4u0qlC1Bc=
=47WT
-----END PGP SIGNATURE-----

#4 lore raw
In reply to Rob Kramer
Quoted 15 lines · Rob Kramer

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'

[...]

Quoted 15 lines

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

Quoted 6 lines

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

author
#3 lore raw
In reply to Paul Sokolovsky

Hi Paul,

Quoted 8 lines · Paul Sokolovsky

So, libreadline4 must work.

General hint: if you have any weird problems with packaging images,
first dumb thing you can try is to remove Packages* files and retry.

That's because ipkg and ipkg-utils have bugs tracking actual state
of package. For example, each time you do "bitbake -c rebuild", and then create image with that package(s), you *must* kill Packages*.

Thanks for the elaborate explanation! Killing Packages* did the trick, though I had to do a 'rebuild package-index' as well, to get them back.

Cheers!

Rob