[OS-BUILD PATCH 4/7] redhat: always add a rebase entry when ark merges from upstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Herton R. Krzesinski <herton@xxxxxxxxxx>

redhat: always add a rebase entry when ark merges from upstream

We have some complex logic to parse changelog entries to choose whether
we add a rebase entry or not to the changelog. Since genlog.py is adding
a Resolves entry always now, simply replace that logic with a
replacement using sed to add a rebase entry when the markers differ.
The marker check doesn't work at the moment due Makefile logic but
that will be fixed in the following changes.

Signed-off-by: Herton R. Krzesinski <herton@xxxxxxxxxx>

diff --git a/redhat/genlog.sh b/redhat/genlog.sh
index blahblah..blahblah 100755
--- a/redhat/genlog.sh
+++ b/redhat/genlog.sh
@@ -48,14 +48,9 @@ fi
 # If the markers aren't the same then this a rebase.
 # This means we need to zap entries that are already present in the changelog.
 if [ "$MARKER" != "$LAST_MARKER" ]; then
-	# awk trick to get all unique lines
-	awk '!seen[$0]++' "$SOURCES/$SPECCHANGELOG" "$clogf" > "$clogf.unique"
-	# sed trick to get the end of the changelog minus the line
-	sed -e '1,/# END OF CHANGELOG/ d' "$clogf.unique" > "$clogf.tmp"
-	# Add an explicit entry to indicate a rebase.
-	echo "" > "$clogf"
-	echo -e "- $MARKER rebase" | cat "$clogf.tmp" - >> "$clogf"
-	rm "$clogf.tmp" "$clogf.unique"
+	# genlog.py always adds a Resolves: line, thus we
+	# can insert the rebase changelog item before it
+	sed -i "s/\(^Resolves:.*\)/- $MARKER rebase\n\1/" "$clogf"
 fi
 
 # during rh-dist-git genspec runs again and generates empty changelog

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1980
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux