Skip to contentSkip to conversation

DISTRO_PR, ipkg dependencies, and meta toolchains...

DISCUSSION Mike (mwester) 4 participants 7 messages Nov 1, 2008 – Nov 3, 2008

lore
Share & tools
lore
#0 lore raw

Consider the control data for openssl-dev (exerpts):

Package: openssl-dev
Version: 0.9.7g-r7.1
...
Depends: openssl (= 0.9.7g-r7), libcrypto0.9.7, libssl0.9.7
Recommends: libc6-dev, libgcc-dev, libcrypto-dev...

Note in particular the openssl-dev version number, which has the DISTRO_PR appended to make it "-r7.1" instead of just "-r7".

But in the dependencies, it lists the specific version of the corresponding runtime -- without the DISTRO_PR. And of course, that specific version doesn't exist (or rather, if it exists in someone's environment, it would be a left-over ipkg from before the DISTRO_PR was added).

One place this bites us is in the SDK assembling (bitbake meta-toolchain-<whatever>):

| Collected errors:
| * ERROR: Cannot satisfy the following dependencies for task-fso-toolchain-target:
| * openssl (= 0.9.7g-r7) *

Poking about I can find a place in the appropriate bbclass files to hack things up so that my specific problem will be resolved -- but I'd prefer that someone who understands just how much of the rdepends/rrecommends needs this treatment offer some advice first. (And of course, I should warn anyone who cares that I know Perl far better than Python, a fact that would almost certainly end up reflected in the patch I would write!)

Mike (mwester)

#1 lore raw

Mike (mwester) wrote:

(Replying to my own email, and what's worse -- I'm top-posting!) (And I changed the subject line to add [RFC] to get your attention.)

I found the problem. Here's a fix:
--------------------------------------------

classes/package.bbclass +0 -0
index 8db000b..a1cbe61 100644
@@ -459,7 +459,7 @@ python populate_packages () {
        for pkg in package_list:
                rdepends = explode_deps(bb.data.getVar('RDEPENDS_' +

pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "

- remstr = "${PN} (= ${DEBPV})"
+ remstr = "${PN} (= ${DEBPV}${DISTRO_PR})"
if main_is_empty and remstr in rdepends:
rdepends.remove(remstr)
for l in dangling_links[pkg]:
--------------------------------------------

This changes the dependencies written into the "-dev" packages so that they include the DISTRO_PR suffix correctly.

Note that this change will require a full rebuild of every -dev package in order to correct the dependencies listed therein.

In addition, there are a couple of recipes that use DEBPV directly -- if nobody objects, I'll add DISTRO_PR to these as well:

linux-libc-headers/linux-libc-headers.inc
net-snmp/net-snmp_5.4.1.bb

(By-the-way, another solution might be to set DEBPV to include the DISTRO_PR, but grep was unable to tell me where that variable is set.)

If nobody objects I'll commit this fix.

Mike (mwester)

Quoted 39 lines

Consider the control data for openssl-dev (exerpts):

Package: openssl-dev
Version: 0.9.7g-r7.1
...
Depends: openssl (= 0.9.7g-r7), libcrypto0.9.7, libssl0.9.7
Recommends: libc6-dev, libgcc-dev, libcrypto-dev...

Note in particular the openssl-dev version number, which has the DISTRO_PR appended to make it "-r7.1" instead of just "-r7".

But in the dependencies, it lists the specific version of the corresponding runtime -- without the DISTRO_PR. And of course, that specific version doesn't exist (or rather, if it exists in someone's environment, it would be a left-over ipkg from before the DISTRO_PR was added).

One place this bites us is in the SDK assembling (bitbake meta-toolchain-<whatever>):

| Collected errors:
| * ERROR: Cannot satisfy the following dependencies for task-fso-toolchain-target:
| * openssl (= 0.9.7g-r7) *

Poking about I can find a place in the appropriate bbclass files to hack things up so that my specific problem will be resolved -- but I'd prefer that someone who understands just how much of the rdepends/rrecommends needs this treatment offer some advice first. (And of course, I should warn anyone who cares that I know Perl far better than Python, a fact that would almost certainly end up reflected in the patch I would write!)

Mike (mwester)

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 6 lines · Mike (mwester)

Mike (mwester) wrote:

(Replying to my own email, and what's worse -- I'm top-posting!) (And I changed the subject line to add [RFC] to get your attention.)

I found the problem. Here's a fix:

And this would explain why the problem wasn't seen before, <sarcasm>
All of you, me and poky use the SDK stuff </sarcam>

:)

As the area in question came from me, that looks good to me. That's where we remove the dep the -dev package has on the main package, if the main package doesn't exist.

[snip]

Quoted 2 lines

This changes the dependencies written into the "-dev" packages so that they include the DISTRO_PR suffix correctly.

Actually, as I think more, why isn't ${DISTRO_PR} part of ${DEBPV} ? That seems to be the real bug..

Quoted 2 lines

(By-the-way, another solution might be to set DEBPV to include the DISTRO_PR, but grep was unable to tell me where that variable is set.)

... as you suggest.

Signature · 1 line
Tom Rini
#3 lore raw
In reply to Mike (mwester)
Quoted 6 lines · On Monday 03 November 2008 03:19:22 Mike (mwester) wrote:

Mike (mwester) wrote:

(Replying to my own email, and what's worse -- I'm top-posting!) (And I changed the subject line to add [RFC] to get your attention.)

I found the problem. Here's a fix:

eek, otavios and richard went over it. could you please comment?

z.

#4 lore raw
Quoted 9 lines · Holger Freyther
Quoted 6 lines · On Monday 03 November 2008 03:19:22 Mike (mwester) wrote:

Mike (mwester) wrote:

(Replying to my own email, and what's worse -- I'm top-posting!) (And I changed the subject line to add [RFC] to get your attention.)

I found the problem. Here's a fix:

eek, otavios and richard went over it. could you please comment?

It is fixed in current GIT and works fine for me since then...

Signature · 8 lines
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [email protected]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."
#5 lore raw
Quoted 5 lines · Otavio Salvador
Quoted 3 lines · Holger Freyther
Quoted 2 lines · On Monday 03 November 2008 03:19:22 Mike (mwester) wrote:

Mike (mwester) wrote:

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines

(Replying to my own email, and what's worse -- I'm top-posting!) (And I changed the subject line to add [RFC] to get your attention.)

I found the problem. Here's a fix:

eek, otavios and richard went over it. could you please comment?

It is fixed in current GIT and works fine for me since then...

I'm not sure what you are saying here -- I'm using the GIT tip, and the patches I posted are required. It's really quite easy to see -- just do "ar x something-dev.ipk", extract the control file, and look at the dependency -- without the patch I posted, the dependency on package "something" is written with an explicit version number that does not exist, because it does not have the DISTRO_PR on it.

Mike (mwester)

#6 lore raw
Quoted 12 lines · Mike (mwester)
Quoted 11 lines · Otavio Salvador
Quoted 8 lines · Holger Freyther
Quoted 6 lines · On Monday 03 November 2008 03:19:22 Mike (mwester) wrote:

Mike (mwester) wrote:

(Replying to my own email, and what's worse -- I'm top-posting!) (And I changed the subject line to add [RFC] to get your attention.)

I found the problem. Here's a fix:

eek, otavios and richard went over it. could you please comment?

Quoted 8 lines
Quoted 1 line

It is fixed in current GIT and works fine for me since then...

I'm not sure what you are saying here -- I'm using the GIT tip, and the patches I posted are required. It's really quite easy to see -- just do "ar x something-dev.ipk", extract the control file, and look at the dependency -- without the patch I posted, the dependency on package "something" is written with an explicit version number that does not exist, because it does not have the DISTRO_PR on it.

Please test today's tip since I've applied a missing piece of fix. I guess it will work for you.

Signature · 8 lines
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [email protected]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."