Skip to content

Name conversion is too complex #278

Description

@gordonmessmer

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions