'A tool shed repository is being installed or updated so handle tool panel alterations accordingly.'

def add_to_tool_panel(self, repository_name, repository_clone_url, changeset_revision, repository_tools_tups, owner, shed_tool_conf, tool_panel_dict, new_install=True, tool_panel_section_mapping={}):

    shed_tool_conf_dict = self.get_shed_tool_conf_dict(shed_tool_conf)
    tool_panel_dict = self.update_tool_panel_dict(tool_panel_dict, tool_panel_section_mapping, repository_tools_tups)
    elem_list = self.generate_tool_panel_elem_list(repository_name, repository_clone_url, changeset_revision, tool_panel_dict, repository_tools_tups, owner=owner)
    if new_install:
        tool_path = shed_tool_conf_dict['tool_path']
        config_elems = shed_tool_conf_dict['config_elems']
        for config_elem in elem_list:
            config_elems.append(config_elem)
            self.app.toolbox.load_item(config_elem, tool_path=tool_path, load_panel_dict=True, guid=config_elem.get('guid'))
        shed_tool_conf_dict['config_elems'] = config_elems
        self.app.toolbox.update_shed_config(shed_tool_conf_dict)
        self.add_to_shed_tool_config(shed_tool_conf_dict, elem_list)
