packit / specfile

A library for parsing and manipulating RPM spec files
MIT License
23 stars 14 forks source link

Changelog entry #362

Closed xsuchy closed 5 months ago

xsuchy commented 5 months ago

I used a code from an example in README and used:

specfile.add_changelog_entry(
    f"convert license to SPDX",
    author='Miroslav Suchý',
    email='msuchy@redhat.com',
    timestamp=datetime.now(),                                                                                                                                                                     
)

but this produces the following diff:

 %changelog
+* Thu Apr 04 20:52:02 UTC 2024 Miroslav Suchý <msuchy@redhat.com> - 1.10-50
+convert license to SPDX
+
 * Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-50

Either it should produce:

* Thu Apr 04 20:52:02 UTC 2024 Miroslav Suchý <msuchy@redhat.com> - 1.10-50
- convert license to SPDX

or the example should be:

specfile.add_changelog_entry(
    '- New upstream release 2.1',