fedora-python / fedora-python/pyp2rpm

Name conversion is too complex

Open
#278 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
129
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Name conversion is hard to understand, especially since names are converted once in Convertor.name_convertor() during metadata extraction, and then again during spec template rendering, by the dependencies macro in pyp2rpm/templates/macros.spec. The first name conversion may use one of several classes, but the final conversion always uses the base NameConvertor class (in pyp2rpm/filters.py)

Consider keeping dependencies in their raw format until template rendering time, and then converting them once, or converting them during metadata extraction, but not both.

Additionally, consider whether retaining the DandifiedNameConvertor makes sense. It's only available when the "dnf" python module is, but is never used when the output is for fedora or mageia. It searches the repositories defined on the host where it runs, rather than the target system. Its output is less stable than is probably desirable, there are too few scenarios where it will be used, and too many scenarios where it will produce the wrong result.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.