[packages/adapter: 264/631] - sorting fixes

glen glen at pld-linux.org
Mon Sep 12 19:56:35 CEST 2016


commit 4414eb86c7ebbc28f90b3b38a5574a8b36924aef
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon Dec 26 23:49:17 2005 +0000

    - sorting fixes
    
    Changed files:
        adapter.awk -> 1.254

 adapter.awk | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index e911ff4..cb73114 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -27,7 +27,7 @@ BEGIN {
 	RPM_SECTIONS = "package|build|changelog|clean|description|install|post|posttrans|postun|pre|prep|pretrans|preun|triggerin|triggerpostun|triggerun"
 	SECTIONS = "^%(" RPM_SECTIONS ")"
 
-	PREAMBLE_TAGS = "(Summary|Name|Version|Release|License|Group|URL|BuildArch|BuildRoot|Obsoletes|Provides|PreReq|(Build)?Requires)"
+	PREAMBLE_TAGS = "(Summary|Name|Version|Release|License|Group|URL|BuildArch|BuildRoot|Obsoletes|Conflicts|Provides|ExclusiveArch|ExcludeArch|PreReq|(Build)?Requires)"
 
 	preamble = 1		# Is it part of preamble? Default - yes
 	boc = 4			# Beginning of %changelog
@@ -108,7 +108,7 @@ function b_makekey(a, b,	s) {
     gsub(/[#%]+{[!?]+[_a-zA-Z0-9]+:/, "", s);
 
 	# kill commented out items
-    gsub(/[# \t]*/, "", s);
+    gsub(/^#[ \t]*/, "", s);
 
 	# force order
     gsub(/^Summary\(/, "11Summary(", s);
@@ -120,10 +120,13 @@ function b_makekey(a, b,	s) {
     gsub(/^Group/, "6Group", s);
     gsub(/^URL/, "7URL", s);
 
-    gsub(/^Provides/, "XProvides", s);
-    gsub(/^Obsoletes/, "YObsoletes", s);
-    gsub(/^BuildArch/, "ZBuildArch", s);
-    gsub(/^BuildRoot/, "ZBuildRoot", s);
+    gsub(/^Provides/, "X1Provides", s);
+    gsub(/^Obsoletes/, "X2Obsoletes", s);
+    gsub(/^Conflicts/, "X3Conflicts", s);
+    gsub(/^BuildArch/, "X4BuildArch", s);
+    gsub(/^BuildRoot/, "X5BuildRoot", s);
+    gsub(/^ExclusiveArch/, "X6ExclusiveArch", s);
+    gsub(/^ExcludeArch/, "X6ExcludeArch", s);
 
 #	printf("%s -> %s\n", a""b, s);
 	return s;
@@ -141,8 +144,11 @@ function b_makekey(a, b,	s) {
 
 	# Generally, comments are printed without touching
 	sub(/[ \t]+$/, "")
-	print $0
-	next
+
+	if (/Source.*md5/) {
+		print $0
+		next
+	}
 }
 
 /^%define/ {
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list