[packages/adapter: 154/631] - sysconfig fixes: another try

glen glen at pld-linux.org
Mon Sep 12 19:47:22 CEST 2016


commit a825b76b761ca88c3f3fc78b73f18c8c70e9a240
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Apr 6 18:15:08 2005 +0000

    - sysconfig fixes: another try
    
    Changed files:
        adapter.awk -> 1.149

 adapter.awk | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 8d6a9ed..63feaa1 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -711,26 +711,23 @@ function use_files_macros(	i, n, t, a)
 
 	# /etc/sysconfig files
 	# %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
-	if (/\/etc\/sysconfig\// && !/%attr.*/) {
-		$0 = "%attr(640,root,root) " $0
-	}
-
+	# attr not required, allow default 644 attr
 	if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
 		gsub("%config", "%config(noreplace)")
 	}
 
 	if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
-		 $1 = $1 " %config(noreplace)"
-	}
-
-	if (/\/etc\/sysconfig\// && !/%verify/) {
-		gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+		 $NF = "%config(noreplace) " $NF
 	}
 
 	if (/\/etc\/sysconfig\// && /%attr\(755/) {
 		gsub("^%attr\(... *,", "%attr(640,");
 	}
 
+	if (/\/etc\/sysconfig\// && !/%verify/) {
+		gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+	}
+
 
 	# kill leading zeros
 	gsub("%attr\(0", "%attr(")
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list