Bug 4857

Summary: [Hob] After setting SSTATE_MIRRORS, Settings button at image configuration not available
Product: [Build System, Metadata & Runtime] Hob Reporter: Frank Fighting71 <frank.fighting71>
Component: hobAssignee: Cristiana Voicu <cristiana.voicu>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: High CC: andreea.b.proca, belen.barros.pena, cristian.iorga, cristiana.voicu, frank.fighting71, jessica.zhang, poky.bs.watcher, poky.watcher, valentin.popa
Version: 1.5   
Target Milestone: 1.5 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Frank Fighting71 2013-07-17 06:29:37 UTC
After setting the SSTATE_MIRRORS in local.conf according to the example,
settings button not available showing below stack trace:

Traceback (most recent call last):
  File "/poky/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py", line 496, in settings_button_clicked_cb
    response, settings_changed = self.builder.show_simple_settings_dialog()
  File "/poky/bitbake/lib/bb/ui/crumbs/builder.py", line 1258, in show_simple_settings_dialog
    handler = self.handler)
  File "/poky/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py", line 98, in __init__
    self.create_visual_elements()
  File "/poky/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py", line 888, in create_visual_elements
    self.nb.append_page(self.create_shared_state_page(), gtk.Label("Shared state"))
  File "/poky/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py", line 335, in create_shared_state_page
    sm_list = ["Custom", sstatemirror_fields[1], sstatemirror_fields[0]]
IndexError: list index out of range

local.conf set SSTATE_MIRRORS as below:

SSTATE_MIRRORS ?= "\
file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
file://.* file:///some/local/dir/sstate/PATH"

Settings button becomes not available, because when create_shared_state_page() in simplesettingsdialog.py,
searched_string was set to "file://" as below:
searched_string = "file://"

The logic to parse each sstate mirrors regex and url is not right, if SSTATE_MIRRORS has this pattern:
file://.* file:///some/local/dir/sstate/PATH
Comment 2 Andreea Brandusa Proca 2013-10-03 08:47:46 UTC
Verified in master:4d8ab87d25ea6e59dc88375813ef88ee0ac813d0.