[packages/adapter: 110/631] - fix %changelog creation

glen glen at pld-linux.org
Mon Sep 12 19:43:41 CEST 2016


commit d31b8a4875ca2c1eebe84e1318c60a3b2d0ad358
Author: ankry <ankry at pld-linux.org>
Date:   Mon Feb 17 20:52:46 2003 +0000

    - fix %changelog creation
    
    Changed files:
        adapter.awk -> 1.110

 adapter.awk | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index e2f4e65..258953c 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -13,7 +13,7 @@
 
 BEGIN {
 	preamble = 1		# Is it part of preamble? Default - yes
-	boc = 2			# Beggining of %changelog
+	boc = 4			# Beggining of %changelog
 	bod = 0			# Beggining of %description
 	tw = 70        		# Descriptions width
 	
@@ -273,23 +273,32 @@ defattr == 1 {
 	has_changelog = 1
 	# There should be some CVS keywords on the first line of %changelog.
 	if (boc == 1) {
-		if (!/PLD Team/) {
-			print "* %{date} PLD Team <feedback at pld.org.pl>" > changelog_file
+		if (!/\$Log$/) {
+			print "$" "Log:$" > changelog_file
+		}
+		boc = 0
+	}
+	if (boc == 2) {
+		if (!/All persons listed below/) {
 			printf "All persons listed below can be reached at " > changelog_file
 			print "<cvs_login>@pld.org.pl\n" > changelog_file
-			print "$" "Log:$" > changelog_file
 		}
 		boc = 0
 	}
-	
+	if (boc == 3) {
+		if (!/PLD Team/) {
+			print "* %{date} PLD Team <feedback at pld.org.pl>" > changelog_file
+		}
+		boc = 2
+	}
 	# Define date macro.
-	if (boc == 2) {
+	if (boc == 4) {
 		if (date == 0) {
 			printf "%%define date\t%%(echo `LC_ALL=\"C\"" > changelog_file
 			print " date +\"%a %b %d %Y\"`)" > changelog_file
 			date = 1
 		}
-		boc = 1
+		boc = 3
 	}
 
 	sub(/[ \t]+$/, "")
@@ -495,12 +504,14 @@ END {
 	if (has_changelog == 0)
 		print "%changelog"
 
-	if (boc > 0) {
+	if (boc > 2)
 		print "* %{date} PLD Team <feedback at pld.org.pl>"
+	if (boc > 1) {
 		printf "All persons listed below can be reached at "
 		print "<cvs_login>@pld.org.pl\n"
-		print "$" "Log:$"
 	}
+	if (boc > 0)
+		print "$" "Log:$"
 }
 
 function fixedsub(s1,s2,t,      ind) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list