[packages/adapter: 271/631] - split Obsoletes/Requires also by space

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


commit a3fcc30951201c23c3999331050da7ac3563a30a
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Dec 31 12:11:35 2005 +0000

    - split Obsoletes/Requires also by space
    
    Changed files:
        adapter.awk -> 1.261

 adapter.awk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 534fdee..876adc3 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -614,9 +614,9 @@ preamble == 1 {
 	}
 
 	# split (build)requires, obsoletes on commas
-	if (field ~ /(obsoletes|requires):/ && $0 ~ /,/) {
+	if (field ~ /(obsoletes|requires):/ && NF > 2) {
 		l = substr($0, index($0, $2));
-		n = split(l, p, / *, */);
+		n = split(l, p, / *,? */);
 		for (i in p) {
 			printf("%s\t%s\n", $1, p[i]);
 		}
@@ -696,7 +696,7 @@ preamble == 1 {
 			sub(/\.pamd$/,"",url[n])
 		}
 
-		# allow %{name} just in last url component
+		# allow %{name} only in last url component
 		s = ""
 		for (i = 1; i <= n; i++) {
 			url[i] = fixedsub("%{name}", name, url[i])
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list