[packages/adapter: 259/631] - also sort Provides and Obsoletes

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


commit 3b0074cc558c6a0dddef1cae44b2862a5d1405c9
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sun Dec 25 23:22:49 2005 +0000

    - also sort Provides and Obsoletes
    
    Changed files:
        adapter.awk -> 1.249

 adapter.awk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/adapter.awk b/adapter.awk
index 60eff7e..bf6a124 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -104,8 +104,13 @@ function b_makekey(a, b,	s) {
 	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 @@ function b_makekey(a, b,	s) {
 #   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);
 	}
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list