Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name conversion is too complex #278

Open
gordonmessmer opened this issue Dec 22, 2021 · 0 comments
Open

Name conversion is too complex #278

gordonmessmer opened this issue Dec 22, 2021 · 0 comments

Comments

@gordonmessmer
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant