From 4e79d13638c960652836e138dc9fccd7ec95ea28 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 21 Sep 2022 23:47:02 +0300 Subject: [PATCH] Switch t2 to srcnames (#944) --- repology/packagemaker/names.py | 13 ++----------- repology/parsers/parsers/t2.py | 2 +- repos.d/t2.yaml | 6 +++--- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/repology/packagemaker/names.py b/repology/packagemaker/names.py index 277082a4c..35b185b49 100644 --- a/repology/packagemaker/names.py +++ b/repology/packagemaker/names.py @@ -92,9 +92,6 @@ class NameType: SLACKWARE_FULL_NAME: ClassVar[int] = IGNORED SLACKWARE_PSEUDO_FULL_NAME: ClassVar[int] = 172 - T2_NAME: ClassVar[int] = 180 - T2_FULL_NAME: ClassVar[int] = 181 - SRCRPM_NAME: ClassVar[int] = 190 BINRPM_NAME: ClassVar[int] = 200 @@ -240,6 +237,8 @@ class NameType: SLACKBUILDS_NAME: ClassVar[int] = GENERIC_CATNAME_NAME SLACKBUILDS_FULL_NAME: ClassVar[int] = GENERIC_CATNAME_FULL_NAME + T2_NAME: ClassVar[int] = GENERIC_SRC_NAME + @dataclass class _NameMapping: @@ -427,14 +426,6 @@ class MappedNames: projectname_seed=NameType.SLACKWARE_NAME, trackname=NameType.SLACKWARE_PSEUDO_FULL_NAME, ), - # T2 - _NameMapping( - name=NameType.T2_NAME, - srcname=NameType.T2_FULL_NAME, - trackname=NameType.T2_NAME, - visiblename=NameType.T2_NAME, - projectname_seed=NameType.T2_NAME, - ), # RPM _NameMapping( srcname=NameType.SRCRPM_NAME, diff --git a/repology/parsers/parsers/t2.py b/repology/parsers/parsers/t2.py index cf8932247..17a7f3782 100644 --- a/repology/parsers/parsers/t2.py +++ b/repology/parsers/parsers/t2.py @@ -93,7 +93,7 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake data = _parse_descfile(desc_path, pkg) pkg.add_name(name, NameType.T2_NAME) - pkg.add_name(pkgpath, NameType.T2_FULL_NAME) + pkg.set_extra_field('path', pkgpath) pkg.set_version(data['version'][0]) pkg.set_summary(data['title'][0]) diff --git a/repos.d/t2.yaml b/repos.d/t2.yaml index 7fbe0f860..6b625eacc 100644 --- a/repos.d/t2.yaml +++ b/repos.d/t2.yaml @@ -21,9 +21,9 @@ url: http://t2sde.org/packages/ packagelinks: - type: PACKAGE_HOMEPAGE - url: 'http://t2sde.org/packages/{name}' + url: 'http://t2sde.org/packages/{path}' - type: PACKAGE_SOURCES - url: 'http://svn.exactcode.de/t2/trunk/package/{srcname}/' + url: 'http://svn.exactcode.de/t2/trunk/package/{path}/' - type: PACKAGE_PATCH_RAW - url: 'http://svn.exactcode.de/t2/trunk/package/{srcname}/{?patch}' + url: 'http://svn.exactcode.de/t2/trunk/package/{path}/{?patch}' groups: [ all, production ]