Skip to content

Commit f13a00d

Browse files
committed
nix: partial switch to explicit pname/version
Switch to pname/version parsing (instead of splitting name into these) for specific case of "{name}-unstable-{ver}". Before, "unstable" was parsed as a part of the package name, while it belongs to version in most cases. This reduces diff for following steps of switching to pname/version.
1 parent 6cf796c commit f13a00d

File tree

1 file changed

+2
-0
lines changed
  • repology/parsers/parsers

1 file changed

+2
-0
lines changed

repology/parsers/parsers/nix.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake
186186
if match is None:
187187
pkg.log('cannot parse name "{}"'.format(packagedata['name']), severity=Logger.ERROR)
188188
continue
189+
elif match.group(1).endswith('-unstable') and version.startswith('unstable-') and match.group(1)[:-9] == pname and match.group(2) == version[9:]:
190+
pass
189191
else:
190192
pname = match.group(1)
191193
version = match.group(2)

0 commit comments

Comments
 (0)