SPECS: adapter.awk - also sort Provides and Obsoletes

glen glen at pld-linux.org
Mon Dec 26 00:22:54 CET 2005


Author: glen                         Date: Sun Dec 25 23:22:54 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- also sort Provides and Obsoletes

---- Files affected:
SPECS:
   adapter.awk (1.248 -> 1.249) 

---- Diffs:

================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.248 SPECS/adapter.awk:1.249
--- SPECS/adapter.awk:1.248	Wed Dec 14 13:51:41 2005
+++ SPECS/adapter.awk	Mon Dec 26 00:22:49 2005
@@ -104,8 +104,13 @@
 	s = a "" b;
 	# kill bcond
     gsub(/[#%]+{[!?]+[_a-zA-Z0-9]+:/, "", s);
+
 	# kill commented out items
     gsub(/[# \t]*/, "", s);
+
+	# hack: change Obsoletes -> ZObsoletes to sort as last
+    gsub(/^Provides/, "YProvides", s);
+    gsub(/^Obsoletes/, "ZObsoletes", s);
 	return s;
 }
 
@@ -116,7 +121,7 @@
 #   so don't do that.
 # - comments leading the BR/R can not be associated,
 #   so don't adapterize when the BR/R are mixed with comments
-ENVIRON["SKIP_SORTBR"] != 1 && preamble == 1 && /(PreReq|(Build)?Requires)/, /(PreReq|(Build)?Requires)/ {
+ENVIRON["SKIP_SORTBR"] != 1 && preamble == 1 && /(Obsoletes|Provides|PreReq|(Build)?Requires)/, /(Obsoletes|Provides|PreReq|(Build)?Requires)/ {
 	if ($1 ~ /PreReq:/) {
 		sub(/PreReq:/, "Requires:", $1);
 	}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/adapter.awk?r1=1.248&r2=1.249&f=u



More information about the pld-cvs-commit mailing list