diff --git a/repology/parsers/parsers/ros.py b/repology/parsers/parsers/ros.py index 2583a8b1..9e3ef8fa 100644 --- a/repology/parsers/parsers/ros.py +++ b/repology/parsers/parsers/ros.py @@ -21,7 +21,7 @@ from repology.package import LinkType from repology.packagemaker import NameType, PackageFactory, PackageMaker from repology.parsers import Parser -from yaml import load +from yaml import safe_load try: from yaml import CLoader as Loader @@ -45,23 +45,23 @@ def ros_extract_recipe_url(key, /, *, url, tags, version, **kwargs): class RosYamlParser(Parser): def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMaker]: with open(path) as f: - data = load(f, Loader=Loader) + data = safe_load(f, Loader=Loader) for key, packagedata in data['repositories'].items(): with factory.begin(key) as pkg: # Some included packages are not yet released, # and only available as source if 'release' not in packagedata: - pkg.log(f'dropping {pkg}: no release', severity=Logger.ERROR) + pkg.log(f'dropping {key}: no release', severity=Logger.ERROR) continue release = packagedata['release'] if 'version' not in release: - pkg.log(f'dropping {pkg}: has no version.', severity=Logger.ERROR) + pkg.log(f'dropping {key}: has no version.', severity=Logger.ERROR) continue if 'bitbucket' in release['url']: - pkg.log(f'dropping {pkg}: RIP bitbucket', severity=Logger.ERROR) + pkg.log(f'dropping {key}: RIP bitbucket', severity=Logger.ERROR) continue pkg.add_name(key, NameType.ROS_NAME) @@ -70,12 +70,12 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake if recipe_url := ros_extract_recipe_url(key, **release): pkg.add_links(LinkType.PACKAGE_RECIPE, recipe_url) else: - pkg.log(f'{pkg} has no known recipe url', severity=Logger.WARNING) + pkg.log(f'{key} has no known recipe url', severity=Logger.WARNING) if source := packagedata.get('source'): pkg.add_links(LinkType.UPSTREAM_HOMEPAGE, source['url']) else: - pkg.log(f'{pkg} has no source', severity=Logger.WARNING) + pkg.log(f'{key} has no source', severity=Logger.WARNING) if doc := packagedata.get('doc'): pkg.add_links(LinkType.UPSTREAM_DOCUMENTATION, doc['url']) diff --git a/repos.d/ros.yaml b/repos.d/ros.yaml index f30e8ca8..ce65bd76 100644 --- a/repos.d/ros.yaml +++ b/repos.d/ros.yaml @@ -4,7 +4,7 @@ {% macro ros(version, name, minpackages, valid_till) %} - name: ros_{{version}}_{{name}} type: repository - desc: ROS {{name}} {% if version > 1 %}(ROS {{version}}){% endif %} + desc: ROS {% if version > 1 %}{{ version }} {% endif %}{{name}} statsgroup: ros family: ros ruleset: ros @@ -40,7 +40,7 @@ {{ ros(1, 'kinetic', minpackages=950, valid_till='2021-04-30') }} {{ ros(1, 'lunar', minpackages=350, valid_till='2019-05-31') }} {{ ros(1, 'melodic', minpackages=850, valid_till='2023-06-27') }} -{{ ros(1, 'noetic', minpackages=750, valid_till='2025-05-31') }} +{{ ros(1, 'noetic', minpackages=700, valid_till='2025-05-31') }} {{ ros(2, 'ardent', minpackages=50, valid_till='2018-12-31') }} {{ ros(2, 'bouncy', minpackages=50, valid_till='2019-06-30') }}