Skip to content

redhat: create an empty changelog file when changing its name

Bugzilla: INTERNAL Upstream Status: RHEL only

Up until now, if we rename the spec package name or bump the rhel major or minor versions, we used to copy the previous changelog file if it exists into the new one. However, this makes the changelog grow indefinitely since a stream start, and it starts to get very big. We do not need to keep the entire history at each new changelog file, because eg. in a stream life, we always keep the older changelog files in the git tree.

Thus, instead of copying the old changelog, just create a new empty file. This also makes sure we trim the rpm changelog at each new minor release, since it's used as the source of the rpm package changelog content. And that's another intention with this change: to avoid having the rpm changelog contents to grow too big, as reported by Brian Masney.

There was also a case where if we are starting a stream or changing the package name, and there is no old changelog file available, we copied a kernel.changelog* if it existed. But looks like this case we should also do the same and trim it to start fresh, the old changelog file can be kept if wanted in the tree for reference and we don't necessarily need to copy all entries from the old changelog.

With this there is some simplification as well and we can remove the CHANGELOG_PREV_EXT variable.

Reported-by: Brian Masney bmasney@redhat.com Signed-off-by: Herton R. Krzesinski herton@redhat.com

Merge request reports