def sanitize_source_indexes(self):
_LOGGER.debug("<STR_LIT>")<EOL>def _index_check(package_version: PackageVersion, source: Source):<EOL><INDENT>if source is package_version.index:<EOL><INDENT>return<EOL><DEDENT>if source.name == package_version.index.name and source.url != package_version.index.url:<EOL><INDENT>raise InternalError(<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>elif source.name == package_version.index.name and source.verify_ssl != package_version.index.verify_ssl:<EOL><INDENT>raise InternalError(<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>for package_version in chain(self.packages.packages.values(), self.dev_packages.packages.values()):<EOL><INDENT>if not package_version.index:<EOL><INDENT>continue<EOL><DEDENT>if package_version.index.name not in self.meta.sources:<EOL><INDENT>for source in self.meta.sources.values():<EOL><INDENT>_index_check(package_version, source)<EOL><DEDENT>self.meta.sources[package_version.index.name] = package_version.index<EOL><DEDENT>else:<EOL><INDENT>_index_check(package_version, self.meta.sources[package_version.index.name])<EOL><DEDENT><DEDENT>
Make sure all indexes used by packages are registerd in meta.