Bug 5655

Summary: Wrong values in Recipe_Dependency table
Product: [Build System, Metadata & Runtime] Toaster Reporter: Andreea Brandusa Proca <andreea.b.proca>
Component: toasterAssignee: Irina Patru <irina.patru>
Status: VERIFIED FIXED QA Contact: Ionut Chisanovici <ionutx.chisanovici>
Severity: normal    
Priority: Medium+ CC: alexandru.damian, belen.barros.pena, bogdanx.a.voiculescu, cristiana.voicu, ionutx.chisanovici, jessica.zhang
Version: unspecified   
Target Milestone: 1.6 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
database none

Description Andreea Brandusa Proca 2013-12-11 15:00:42 UTC
Created attachment 1665 [details]
database

A recipe depends on the same recipe.
2 examples are:
1. {
    "pk": 6,.
    "model": "orm.recipe_dependency",.
    "fields": {
        "depends_on": 5,.
        "recipe": 5,.
        "dep_type": 0
    }
The name of the recipe 5 is: "gettext".

2. {
    "pk": 503,.
    "model": "orm.recipe_dependency",.
    "fields": {
        "depends_on": 136,.
        "recipe": 136,.
        "dep_type": 1
    }
The name of the recipe 136 is "libx11".
Tested on toaster/master:7e7b2a24952c904fe934565068b1f6583eacd450

I have attached the database.
Comment 1 Andreea Brandusa Proca 2013-12-20 11:55:13 UTC
This also happens in master:bc1e359aaefeeddf8525b46eb80ac14db7f637b3
Comment 2 Andreea Brandusa Proca 2014-01-17 09:13:58 UTC
In Package_Dependency table, we find the same problem:

{
    "pk": 47,.
    "model": "orm.package_dependency",.
    "fields": {
        "depends_on": 19,.
        "target": 1,.
        "dep_type": 6,.
        "package": 19
    }

master:e4c23f7bcb79072ea6028fbdf8f3f0dc17a63371
Comment 3 Alexandru Damian 2014-01-21 10:59:33 UTC
I confirmed that the circular dependency is not an error, and it comes from the build system.
Comment 4 Belen Barros Pena 2014-01-21 14:49:46 UTC
This is what RP had to say about this issue:

"we don't have circular dependencies, however I think I can see how this would come about

bitbake works at the task level so RecipeA:taskD depends on RecipeB:taskE
but RecipeB:taskE might depend upon RecipeA:taskF

it you go up a level and "sum" all the dependencies, it can look like its circular

RecipeA:taskE depends on RecipeA:taskF

so collapse that and you just see RecipeA:RecipeA

Bitbake works at the task level and we cannot change that. 

just hide those in the UI :)"

So we need to detect when a recipe or package reports a dependency on themselves, and hide those. 

You can see an example of those self-dependencies at 

http://i.imgur.com/nLlNzND.png
Comment 6 Ionut Chisanovici 2014-04-15 12:48:00 UTC
This is verified.

IonutC