[packages/adapter: 245/631] - use fixedsub for %setup macros usage (to prevent "%{ver}.%{ver2}" match "%{ver}-%{ver2}")

glen glen at pld-linux.org
Mon Sep 12 19:54:59 CEST 2016


commit e9097b468f00996f101cf5815af5ea4534efce8a
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Dec 13 14:11:12 2005 +0000

    - use fixedsub for %setup macros usage (to prevent "%{ver}.%{ver2}" match "%{ver}-%{ver2}")
    
    Changed files:
        adapter.awk -> 1.236

 adapter.awk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index bc033c7..8d7fa1b 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -273,21 +273,21 @@ preamble == 1 {
 	}
 
 	if (/^%setup/) {
-		gsub(name, "%{name}");
-		gsub(version, "%{version}");
+		$0 = fixedsub(name, "%{name}", $0);
+		$0 = fixedsub(version, "%{version}", $0);
 		if (_beta) {
-			gsub(_beta, "%{_beta}");
+			$0 = fixedsub(_beta, "%{_beta}", $0);
 		}
 		if (_rc) {
-			gsub(_rc, "%{_rc}");
+			$0 = fixedsub(_rc, "%{_rc}", $0);
 		}
 		if (_snap) {
-			gsub(_snap, "%{_snap}");
+			$0 = fixedsub(_snap, "%{_snap}", $0);
 		}
 	}
 
 	if (/^%setup/ && /-n %{name}-%{version}( |$)/) {
-		sub(/ -n %{name}-%{version}/, "")
+		$0 = fixedsub(" -n %{name}-%{version}", "", $0)
 	}
 
 	# invalid in %prep
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list