[packages/adapter: 323/631] - better, at least won't add another one

glen glen at pld-linux.org
Mon Sep 12 20:01:31 CEST 2016


commit 624df313356e56c2f778fb7a333419b9dd34c29e
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon May 29 21:54:27 2006 +0000

    - better, at least won't add another one
    
    Changed files:
        adapter.awk -> 1.311

 adapter.awk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 86892a7..3af83f6 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -441,10 +441,11 @@ function b_makekey(a, b,	s) {
 	preamble = 0
 
 	# foreign rpms
-	$0 = fixedsub("%buildroot", "$RPM_BUILD_ROOT", $0)
-	$0 = fixedsub("%{buildroot}", "$RPM_BUILD_ROOT", $0)
+	sub("^%{__rm} -rf %{buildroot}", "rm -rf $RPM_BUILD_ROOT")
+    sub("%buildroot", "$RPM_BUILD_ROOT");
+    sub("%{buildroot}", "$RPM_BUILD_ROOT");
 
-	if (/^[ \t]*rm([ \t]+-[rf]+)*[ \t]+\${?RPM_BUILD_ROOT}?/ && did_rmroot==0) {
+	if (/^[ \t]*rm([ \t]+-[rf]+)*[ \t]+(\${?RPM_BUILD_ROOT}?|%{?buildroot}?)/ && did_rmroot==0) {
 		did_rmroot=1
 		print "rm -rf $RPM_BUILD_ROOT"
 		next
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list