Hi Richard,

I've taken a look to the code to and didn't find a good solution to
get the right command line appended version.
Meanwhile I thought that maybe the problem is not about how to find
the correct version but to add the package it self to the unresolved
rproviders list twice (1 for -dev and another for -dbg as rdepends and
rrecommends respectively).
So I went to cache .bb and figure out that maybe you should add the
package itself to the list that you will use "to cook".

I tried a lot of stupid things, but now I found one solution that is
working... Please, take a look and test this patch:

Index: bitbake/lib/bb/cache.py
===================================================================
--- bitbake.orig/lib/bb/cache.py        2008-05-07 14:50:36.000000000 -0300
+++ bitbake/lib/bb/cache.py     2008-05-07 14:58:39.000000000 -0300
@@ -365,8 +365,10 @@
             if not package in cacheData.runrecs[file_name]:
                 cacheData.runrecs[file_name][package] = []

-            cacheData.rundeps[file_name][package] = rdepends + " " +
(self.getVar("RDEPENDS_%s" % package, file_name, True) or "")
-            cacheData.runrecs[file_name][package] = rrecommends + " "
+ (self.getVar("RRECOMMENDS_%s" % package, file_name, True) or "")
+            rrdepends_pkg = self.getVar("RDEPENDS_%s" % package,
file_name, True) or ""
+            cacheData.rundeps[file_name][package] = "%s %s" %
(rdepends, " ".join([a for a in rrdepends_pkg.split() if a != pn]))
+            rrecommends_pkg = self.getVar("RRECOMMENDS_%s" % package,
file_name, True) or ""
+            cacheData.runrecs[file_name][package] = "%s %s" %
(rrecommends, " ".join([a for a in rrecommends_pkg.split() if a !=
pn]))

         # Collect files we may need for possible world-dep
         # calculations


Cheers
vivijim.
PS: I've already opened the bug
http://bugs.openembedded.net/show_bug.cgi?id=4230
Don't you thing that is better we move this discussion to the bugtracker?

On Wed, May 7, 2008 at 12:44 PM, Richard Purdie <[EMAIL PROTECTED]> wrote:
>
>  On Wed, 2008-05-07 at 11:48 -0300, Rodrigo Vivi wrote:
>  > >  Is there output about "already staged" packages in the output from
>  > >  bitbake -DDD when this happens? If so, it might be worth trying the
>  > >  patch below...
>  >
>  > No, there is no "already staged" message...
>  > I tried this patch (just in case) and it didn't solve my problem...
>  >
>  > >  If that doesn't help I'll look into it further.
>  > Thanks for your help!
>
>  Well, I've looked into it and I can confirm its totally broken. I used a
>  test case of having both:
>
>  nano_2.0.6.bb
>  nano_2.0.7.bb
>
>  and then
>
>  bitbake nano-2.0.6
>
>  and it does indeed build both when it shouldn't. The problem is in
>  providers.py and taskdata.py which rate the lastest version over the
>  commandline appended version. bitbake knows something is wrong, hence
>  the message about multiple providers but it doesn't understand what.
>
>  Looking at the code, I can't see an easy fix for this problem.
>  "Versioned dependencies" have been on the todo list for a long time and
>  both problems are very related. Both look to need a rewrite of the
>  providers logic though which is going to be painful since that code is
>  full of subtle issues :/.
>
>  Please file a bug in the bugzilla against bitbake and hopefully someone
>  will look into and fix this at some point but it might not be soon.
>
>  Note that if you do something like "PREFERRED_VERSION_nano=2.0.6 bitbake
>  nano", it will work.
>
>  Cheers,
>
>  Richard
>
>
>
>
>



-- 
Rodrigo Vivi
INdT - Instituto Nokia de Tecnologia
Blog: http://blog.vivi.eng.br
GPG: 0x905BE242 @ wwwkeys.pgp.net
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to