Skip to content

Commit 9ef003e

Browse files
committed
# This is a combination of 2 commits.
# This is the 1st commit message: Address #491 add_changelog_entry(): Incorrect evr expansion # This is the commit message #2: Do not ignore user passed `evr`
1 parent 21a45ba commit 9ef003e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

specfile/specfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,11 @@ def add_changelog_entry(
611611
if self.contains_autochangelog(section):
612612
continue
613613
if evr is None:
614-
evr = "%{?epoch:%{epoch}:}%{version}-%{release}"
614+
epoch_prefix = f"{self.expanded_epoch}:" if self.expanded_epoch else ""
615+
evr = f"{epoch_prefix}{self.expanded_version}-{self.expanded_release}"
615616
with self.changelog(section) as changelog:
616617
if changelog is None:
617618
return
618-
evr = self.expand(evr, extra_macros=[("dist", "")])
619619
if isinstance(entry, str):
620620
entry = [entry]
621621
if timestamp is None:

0 commit comments

Comments
 (0)