'For each component, first populate from the `SettingsSpec.settings_spec`
structure, then from the `SettingsSpec.settings_defaults` dictionary.
After all components have been processed, check for and populate from
each component\'s `SettingsSpec.settings_default_overrides` dictionary.'

def populate_from_components(self, components):

    for component in components:
        if (component is None):
            continue
        settings_spec = component.settings_spec
        self.relative_path_settings.extend(component.relative_path_settings)
        for i in range(0, len(settings_spec), 3):
            (title, description, option_spec) = settings_spec[i:(i + 3)]
            if title:
                group = optparse.OptionGroup(self, title, description)
                self.add_option_group(group)
            else:
                group = self
            for (help_text, option_strings, kwargs) in option_spec:
                option = group.add_option(help=help_text, *option_strings, **kwargs)
                if (kwargs.get('action') == 'append'):
                    self.lists[option.dest] = 1
            if component.settings_defaults:
                self.defaults.update(component.settings_defaults)
    for component in components:
        if (component and component.settings_default_overrides):
            self.defaults.update(component.settings_default_overrides)
