Skip to content

Conversation

@huakim
Copy link
Contributor

@huakim huakim commented Jan 8, 2025

No description provided.

…rpm spec files, remove shebangs, fix missing provides_extra field
Copy link
Contributor

@danigm danigm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good. I think that the optional libarchive dep can be avoided using the python standard library.

Also the sanitize of multiline fields can be done in the fix_data function instead of in templates.



def pypi_archive_file(file_path):
if libarchive is None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need libarchive new dep here? Maybe it's possible to use standard python module tarfile or zipfile?

Copy link
Contributor Author

@huakim huakim Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add if libarchive is None: pypi_archive_file_using_tarfile_or_zipfile(file_path) later here

Version: {{ version }}
Release: %autorelease
Summary: {{ summary }}
Summary: {{ summary|replace('\n','') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not needed to modify the templates, you have defined the new fix_data function, what if we do this sanitize operation there instead of doing it in the templates? We can add to the fix_data function something like:

    single_line_fields = ['summary', 'license', 'home_page', 'source_url']
    for field in single_line_fields:
        if field not in data_info:
            continue
        # remove line breaks to avoid multiline rpm spec file
        data_info[field] = data_info[field].replace('\n', ' ')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you removing these example files?

@huakim huakim closed this by deleting the head repository Jan 12, 2025
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

Successfully merging this pull request may close these issues.

2 participants