Bug 5714

Summary: Target field is always empty in orm_package_dependency
Product: [Build System, Metadata & Runtime] Toaster Reporter: Andreea Brandusa Proca <andreea.b.proca>
Component: toasterAssignee: Cristiana Voicu <cristiana.voicu>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: alexandru.damian, belen.barros.pena, cristiana.voicu
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)

Description Andreea Brandusa Proca 2014-01-10 13:25:18 UTC
Example:

   {
    "pk": 1,.
    "model": "orm.package_dependency",.
    "fields": {
        "depends_on": 3,.
        "target": null,.
        "dep_type": 0,.
        "package": 2
    }

Tested on master:e93a345fae7c21652547bec501fcb1f3b6c6427d, qemux86 - core-image-minimal.
Comment 1 Andreea Brandusa Proca 2014-01-15 15:50:27 UTC
This does not happen anymore in master:e4c23f7bcb79072ea6028fbdf8f3f0dc17a63371.

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

Alex, could you, please, update the status?
Comment 2 Alexandru Damian 2014-01-21 15:55:38 UTC
Not happening.
Comment 3 Andreea Brandusa Proca 2014-02-25 13:25:43 UTC
The same issue happens in master:54562006c1327c5b99daa4cc05a3ba7e38412da1

{
    "pk": 1,.
    "model": "orm.package_dependency",.
    "fields": {
        "depends_on": 3,.
        "target": null,.
        "dep_type": 0,.
        "package": 2
    }
Comment 4 Cristiana Voicu 2014-03-04 14:34:55 UTC
I investigated this bug. There is an issue related to dependencies between packages. As specified in the toaster API, the target should be populated for TRDEPENDS and TRCOMMENDS dep_type. But, the issue is that no entry can be found in the database with TRDEPENDS or TRCOMMENDS flag.
It seems that depends*.dot files in buildhistory are not populated after the rootfs refactoring. I filled a bug with this ( #5904) and I will add this bug as a blocker. This should fix this current issue, too. I will retest after #5904 will be fixed.
Comment 5 Cristiana Voicu 2014-03-06 11:51:02 UTC
I've done a clean build using Laurentiu patches from oe-core mailing list, and in this case the database contains entries with target !=null, for e.g. 

{
    "pk": 12942,
    "model": "orm.package_dependency",
    "fields": {
        "depends_on": 3573,
        "target": 1,
        "dep_type": 3,
        "package": 3383
    }
},

After those patches will be merged on master, I will set this bug on fised, too.
Comment 6 Cristiana Voicu 2014-03-07 14:50:37 UTC
waiting for patches for 5904 to be merged
Comment 7 Cristiana Voicu 2014-03-18 09:02:06 UTC
A part of bug #5904 is solved ( http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=6029af2ec5f6a92b41c9e103625699e6ae2e6550), and it solves this bug, too
Comment 8 Andreea Brandusa Proca 2014-03-19 08:31:11 UTC
For dep_type = 1 (TRDEPENDS) or 3 (TRCOMMENDS) the target field is populated.
Verified in: master:463cd34f8c17c67c4f3adf3468424730b22f3974