Skip to content

Commit

Permalink
Switch t2 to srcnames (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Sep 26, 2022
1 parent 0598231 commit 4e79d13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
13 changes: 2 additions & 11 deletions repology/packagemaker/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion repology/parsers/parsers/t2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
6 changes: 3 additions & 3 deletions repos.d/t2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]

0 comments on commit 4e79d13

Please sign in to comment.