Bug 4857 - [Hob] After setting SSTATE_MIRRORS, Settings button at image configuration not available
Summary: [Hob] After setting SSTATE_MIRRORS, Settings button at image configuration no...
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: High critical
Target Milestone: 1.5 M3
Assignee: Cristiana Voicu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-07-17 06:29 UTC by Frank Fighting71
Modified: 2013-10-03 08:47 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.