[packages/adapter: 132/631] - prevent conditionals breaking state of preamble
glen
glen at pld-linux.org
Mon Sep 12 19:45:32 CEST 2016
commit 3d4f199cd4c422eba4a4eb6bc28babc3f278c360
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Sun Feb 13 21:10:12 2005 +0000
- prevent conditionals breaking state of preamble
Changed files:
adapter.awk -> 1.127
adapter.awk | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index ba927b4..85f8528 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -91,7 +91,7 @@ defattr == 1 {
################
# %description #
################
-/^%description/, (/^%[a-z]+/ && !/^%description/) {
+/^%description/, (/^%[a-z]+/ && !/^%description/ && !/^%((end)?if|else)/) {
preamble = 0
if (/^%description/) {
@@ -140,7 +140,7 @@ defattr == 1 {
#########
# %prep #
#########
-/^%prep/, (/^%[a-z]+$/ && !/^%prep/) {
+/^%prep/, (/^%[a-z]+$/ && !/^%prep/ && !/^%((end)?if|else)/) {
preamble = 0
# Add '-q' to %setup
@@ -151,7 +151,7 @@ defattr == 1 {
##########
# %build #
##########
-/^%build/, (/^%[a-z]+$/ && !/^%build/) {
+/^%build/, (/^%[a-z]+$/ && !/^%build/ && !/^%((end)?if|else)/) {
preamble = 0
use_macros()
@@ -200,14 +200,14 @@ defattr == 1 {
##########
# %clean #
##########
-/^%clean/, (/^%[a-z]+$/ && !/^%clean/) {
+/^%clean/, (/^%[a-z]+$/ && !/^%clean/ && !/^%((end)?if|else)/) {
did_clean = 1
}
############
# %install #
############
-/^%install/, (/^%[a-z]+$/ && !/^%install/) {
+/^%install/, (/^%[a-z]+$/ && !/^%install/ && !/^%((end)?if|else)/) {
preamble = 0
@@ -251,7 +251,7 @@ defattr == 1 {
##########
# %files #
##########
-/^%files/, (/^%[a-z \-]+$/ && !/^%files/) {
+/^%files/, (/^%[a-z \-]+$/ && !/^%files/ && !/^%((end)?if|else)/) {
preamble = 0
if ($0 ~ /^%files/)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list