Bug 5996

Summary: The "URI(s) searched" information in the task details page is empty
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: David Reyna <david.reyna>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.damian, belen.barros.pena, cristiana.voicu, jessica.zhang, Yuan.Sun2
Version: unspecified   
Target Milestone: 1.6 M5   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Belen Barros Pena 2014-03-18 14:45:36 UTC
I believe this should be the content of the SSTATE_MIRRORS variable.
Comment 1 Belen Barros Pena 2014-03-19 15:55:15 UTC
David, assigning this one to you quite randomly: feel free to pass it onto someone else if needed.
Comment 2 David Reyna 2014-03-25 05:43:43 UTC
Hi Belen,

1) First of all, the current code is trying to display "task.path_to_sstate_obj" and "task.work_directory", both of which appear to be empty in the database.

This appears to be a backend defect, not a GUI defect. Are these obsolete fields, or just not populated?

2) You mentioned the config var "SSTATE_MIRRORS"?

There is no such value in the database. The closest is "SSTATE_DIR" ( which is "/home/abc/toaster_1_6/build/sstate-cache" in my database).

Should perhaps the task page show this?

  The name of the file searched... = basename(SSTATE_DIR)
  The locations where the above file was searched... = dirname(SSTATE_DIR)

I do not see a list of mirrors, unless SSTATE_DIR is really a list of paths, where the cache file name is the same ("sstate-cache") and the paths perhaps many?

  The name of the file searched... = basename(SSTATE_DIR[0])
  The locations where the above file was searched... = split(SSTATE_DIR,':') | sed -e "s|/sstate-cache||g"

- David
Comment 3 Belen Barros Pena 2014-03-25 10:22:58 UTC
(In reply to comment #2)
> Hi Belen,
> 
> 1) First of all, the current code is trying to display
> "task.path_to_sstate_obj" and "task.work_directory", both of which appear to
> be empty in the database.
> 
> This appears to be a backend defect, not a GUI defect. Are these obsolete
> fields, or just not populated?

task.path_to_sstate_obj is what the "File searched for" item should be set to. It is indeed empty, but I believe Alex is on his way to bringing it in (bug 5252). task.workdirectoy is a different thing (is supposed to show the code executed by a certain task), and we have moved it to 1.7 (bug 5255).

> 
> 2) You mentioned the config var "SSTATE_MIRRORS"?

Mmm, maybe I understood Alex wrong. It might be an idea to ping him to clarify. 


> 
> There is no such value in the database. The closest is "SSTATE_DIR" ( which
> is "/home/abc/toaster_1_6/build/sstate-cache" in my database).
> 
> Should perhaps the task page show this?
> 
>   The name of the file searched... = basename(SSTATE_DIR)
>   The locations where the above file was searched... = dirname(SSTATE_DIR)
> 
> I do not see a list of mirrors, unless SSTATE_DIR is really a list of paths,
> where the cache file name is the same ("sstate-cache") and the paths perhaps
> many?
> 
>   The name of the file searched... = basename(SSTATE_DIR[0])
>   The locations where the above file was searched... = split(SSTATE_DIR,':')
> | sed -e "s|/sstate-cache||g"
> 
> - David
Comment 4 David Reyna 2014-03-26 16:19:46 UTC
Re-assigning to Alex for his review of the issues and backend.

My database has no "SSTATE_MIRRORS" value, but that may be because there are none in my project setup.

There is a "SSTATE_DIR" entry.
Comment 5 Belen Barros Pena 2014-03-26 16:51:08 UTC
Just to clarify, the "URI(s) searched" field should show all the locations where the sstate object was searched, which I guess means SSTATE_DIR and SSTATE_MIRRORS (if any have been set up).
Comment 6 Alexandru Damian 2014-04-02 08:14:12 UTC
Reassiging to David,

Belen is correct, we need to display
SSTATE_DIR 
SSTATE_MIRRORS, processed; 

The processing part of the SSTATE_MIRRORS is:
 * each entry is separated by new-line
 * we need to take the second field from each entry, where the fields are separated by spaces


Hope this helps,
Alex
Comment 7 David Reyna 2014-04-09 23:12:07 UTC
commit efa4a98fe4cea73fb8709d205230046e2a546bbf
Comment 8 Yuan Sun 2014-04-17 03:02:34 UTC
Verified in ea90bd054c449a8e19c474c8bfa8c289f692c33f.